I managed to replicate the behavior you are seeing, not sure why it happens.
My suggestion is to enabled debugging for mod_rewrite and see which rule executes in a loop and why: RewriteLog "/home/gabi/rewrite.log" RewriteLogLevel 3 gabriel On Jun 29, 5:39 am, Mickael HOAREAU <mickael.hoar...@bysoft.fr> wrote: > Hello Gabriel, > > Thanks for your answer. > > I tried this, but it provokes an infinite loop. > > Here the exact content of my .htaccess: > > =============================================== > Options +FollowSymLinks +ExecCGI > > <IfModule mod_rewrite.c> > RewriteEngine On > > RewriteCond %{REQUEST_URI} index\.php [NC] > RewriteRule ^index.php$http://www.example.com/[L,R=301] > > RewriteCond %{REQUEST_FILENAME} !-f > # no, so we redirect to our front web controller > RewriteRule ^(.*)$ index.php [QSA,L] > > </IfModule> > =============================================== > > Mickael > > On 28 juin, 20:30, pghoratiu <pghora...@gmail.com> wrote: > > > > > it should be ok if you put that rule in the following order: > > ============================================== > > RewriteCond %{REQUEST_URI} index\.php [NC] > > RewriteRule ^index.php$http://www.example.com/[L,R=301] > > > # no, so we redirect to our front web controller > > RewriteRule ^(.*)$ index.php [QSA,L] > > ============================================== > > > gabriel > > > On Jun 28, 12:23 pm, Mickael HOAREAU <mickael.hoar...@bysoft.fr> > > wrote: > > > > Hello, > > > > In the default .htaccess of symfony we have: > > > > 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> > > > > I would like to redirectwww.example.com/index.phptowww.example.com > > > with a 301 redirection. > > > > One solution would be to add the following rule in the htaccess: > > > > RewriteCond %{REQUEST_URI} index\.php [NC] > > > RewriteRule ^index.php$http://www.example.com/[L,R=301] > > > > But this rule makes a conflict with the rule : > > > RewriteRule ^(.*)$ index.php [QSA,L] > > > > It provokes an infinite loop. > > > > Another option would to rename the script index.php to another name > > > like frontend.php in the web folder. > > > > But before to do that i want to make sure that there is no other way > > > to do this only by modifying the htaccess. > > > > Does anybody have an idea ? > > > > Thanks in advance for your help. > > > > Mickael -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en