htaccess problems with 301 and ? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: htaccess problems with 301 and ? (/showthread.php?tid=28794) |
htaccess problems with 301 and ? - El Forum - 03-22-2010 [eluser]Scott Boyde[/eluser] recently I had to move hosts and the with the new host I had to add ? into the line that removed the index.php So my this line Code: RewriteRule ^(.*)$ /index.php/$1 [L] Became Code: RewriteRule ^(.*)$ /index.php?/$1 [L] My 301 redirect rule is Code: redirect 301 /pages/home.html http://www.nifootball.co.uk But when you visit that page you just get a url with a ? where the index would normally be http://www.nifootball.co.uk/?/pages/home.html htaccess problems with 301 and ? - El Forum - 03-22-2010 [eluser]farinspace[/eluser] what happens when you don't have the "?" in the rewrite rule? htaccess problems with 301 and ? - El Forum - 03-23-2010 [eluser]Scott Boyde[/eluser] I get page not found for all my pages. htaccess problems with 301 and ? - El Forum - 03-23-2010 [eluser]Maglok[/eluser] Yeah I know the ?. You should make the redirect the last rule executed or htaccess will grab the now new url and feed it to index.php. Code: redirect 301 /pages/home.html http://www.nifootball.co.uk [L] htaccess problems with 301 and ? - El Forum - 03-23-2010 [eluser]Scott Boyde[/eluser] [quote author="Maglok" date="1269359280"]Yeah I know the ?. You should make the redirect the last rule executed or htaccess will grab the now new url and feed it to index.php. Code: redirect 301 /pages/home.html http://www.nifootball.co.uk [L] I get an internal server error when I put that last. htaccess problems with 301 and ? - El Forum - 03-23-2010 [eluser]Maglok[/eluser] Was worth a shot. Oh how I loath htaccess at times. Mabye you can rewrite around it temporarily. RewriteRule it? Shame the [L] didn't work. |