Yii Framework Forum: App In Subfolder Redirecting Automatically To Root - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

App In Subfolder Redirecting Automatically To Root Rate Topic: -----

#1 User is offline   fpolli 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 60
  • Joined: 26-April 12

Posted 11 January 2013 - 02:25 PM

Hi,

I have a Yii app in my webroot directory, and I just started one in a subfolder of the webroot. The subfolder app is barebones created by yiic, with no apparent connections to the webroot application, yet whenever I click on a menu item on the yiic-generated site view, the script is redirected to the webroot index page. The address field of the browser displays the correct url ('http://mydomain.com/appfolder/site/contact'), but the browser window shows the root app's site index.

I have not hacked yii, and just to be sure, I deleted the yii framework folder and reinstalled from a newly downloaded release file. When I echo baseUrl in the subfolder app, it returns the correct url.
0

#2 User is offline   Keith 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 1,629
  • Joined: 04-March 10
  • Location:UK

Posted 11 January 2013 - 02:52 PM

It sounds like your URL rewriting rules are conflicting. I'd guess all of your requests to a non-existent file are being routed to your original index file. You might be able to set up a rule in your root .htaccess file to ignore requests in that subdirectory.
0

#3 User is offline   fpolli 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 60
  • Joined: 26-April 12

Posted 12 January 2013 - 12:17 PM

View PostKeith, on 11 January 2013 - 02:52 PM, said:

It sounds like your URL rewriting rules are conflicting. I'd guess all of your requests to a non-existent file are being routed to your original index file. You might be able to set up a rule in your root .htaccess file to ignore requests in that subdirectory.


Thank you. My URL rewriting rules are out of the box. I have not made any changes to what is in URL manager, nor have I messed with any .htaccess files.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users