mod_rewrite is blocking 301 redirect.
Posted: Sat Feb 28, 2009 1:03 am
Hi,
I am using mod rewrite for Seo
everything works fine with this code:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
But and its a great but;
when i try to redirect my old pages with this command in .htaccess;
ie: i have a page www.sercotec.net/index.asp which will redirect to www.sercotec.net/index.php
and using this rule below:
Redirect 301 /index.asp http://www.sercotec.net/index.php
and i am getting this result:
http://www.sercotec.net/index.php?page=index.asp
which shows nothing.
If i disable mod rewrite and use pretty urls redirect works.
your help will be appreciated,
thank you in advance...
I am using mod rewrite for Seo
everything works fine with this code:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
But and its a great but;
when i try to redirect my old pages with this command in .htaccess;
ie: i have a page www.sercotec.net/index.asp which will redirect to www.sercotec.net/index.php
and using this rule below:
Redirect 301 /index.asp http://www.sercotec.net/index.php
and i am getting this result:
http://www.sercotec.net/index.php?page=index.asp
which shows nothing.
If i disable mod rewrite and use pretty urls redirect works.
your help will be appreciated,
thank you in advance...