htaccess problems with 301 and ? |
[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
[eluser]farinspace[/eluser]
what happens when you don't have the "?" in the rewrite rule?
[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]
[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.
[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. |
Welcome Guest, Not a member yet? Register Sign In |