I have a serious problem about routing and envirenement or module in symfony 1.4,so I created three modules frontend , mobile and backend.
So in frontend and mobile module,I'm using almost the same routing :
//apps/frontend/config/routing.yml home: url: /home param: { module: user, action: home } homepage: url: / param: { module: content, action: index } .... default_index: url: /:module param: { action: index } default: url: /:module/:action/* mobile module :
//apps/mobile/config/routing.yml home: url: /home param: { module: user, action: home } homepage: url: / param: { module: sfGuardAuth, action: signin } .... default_index: url: /:module param: { action: index } default: url: /:module/:action/* I use the link to access to my site
mysite.com/ ==> frontend module(frontend.php) mysite.com/mobile.php ==> mobile module(mobile.php) The problem is when I access to mobile version to login page correctly but after login they redirect me to homepage of frontend module not to the home page of mobile module?
Remark :
when I use this link mysite.com/mobile_dev.php with dev env the mobile version works very fine!
Edit :
here is my htaccess :
<IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{QUERY_STRING} ^(%2d|-)[^=]+$ [NC] RewriteRule ^(.*) $1? [L] </IfModule> Options +FollowSymLinks +ExecCGI <IfModule mod_rewrite.c> RewriteEngine On # uncomment the following line, if you are having trouble # getting no_script_name to work RewriteBase / # we skip all files with .something #RewriteCond %{REQUEST_URI} \..+$ #RewriteCond %{REQUEST_URI} !\.html$ #RewriteRule .* - [L] # we check if the .html version is here (caching) RewriteRule ^$ index.html [QSA] RewriteRule ^([^.]+)$ $1.html [QSA] RewriteCond %{REQUEST_FILENAME} !-f # no, so we redirect to our front web controller RewriteRule ^(.*)$ index.php [QSA,L] </IfModule> So when I change index.php to mobile.php the link mysite.com/mobile.phpgo directly to to mobile version homepage and all works fine...
So my issue now is how to edit my .htaccess to redirect me like this :
mysite.com/index.php or mysite.com/ redirect me to my site mysite.com/mobile.php redirect me to mobile version Edit2 :
I explain you,when I start with this link mysite.com/mobile.php so it redirect me to mobile apps to login page but when after login instead it go to my homepage the new request search default front controller and it point on index.php so that give me the homepage of frontend apps not the mobile apps!
So why symfony with mobile_dev.php keep in memory it all time that we are in mobile dev env and with mobile.phpit switch me from prod mobile env to frontend prod env in first redirection?
no_script_name: truein allsettings.yml.