subster
Elite Member
- Apr 5, 2008
- 2,158
- 1,609
Hi there,
I am currently migrating to a new shop and every url switches to a new one.
I've this gathered and wanted to do it with a simple redirect 301, but unfortunately due to some mod_rewrite rules in the htaccess it wont work.
Problem:
This block of rules is crucial for the script to work properly:
If I paste now my redirects into the htacess the redirect works, but the targeted url gets an ?linkurl=/old/category at the end what leads the redirect into an 404.
Explained Example:
Pasted at the end of .htaccess:
redirect 301 /old/categorystructure http://www.domain.com/new/categorystructure/ (the old urls did not have a backslash at the end)
Result:
= 404 error
I search someone who could find the right syntax of a mod_rewrite rule to work this problem out.
It is urgent.
Thank you for your replies.
I am currently migrating to a new shop and every url switches to a new one.
I've this gathered and wanted to do it with a simple redirect 301, but unfortunately due to some mod_rewrite rules in the htaccess it wont work.
Problem:
This block of rules is crucial for the script to work properly:
Code:
#RewriteRule ^(.*)(.+)\.html(.*)$ commerce_seo_url.php?linkurl=$1$2$3 [qsappend,L]
RewriteCond %{REQUEST_FILENAME} !\.html$ [OR]
RewriteCond %{REQUEST_FILENAME} !\.php$ [OR]
RewriteRule ^(.*)$ commerce_seo_url.php?linkurl=$1 [qsappend,L]
If I paste now my redirects into the htacess the redirect works, but the targeted url gets an ?linkurl=/old/category at the end what leads the redirect into an 404.
Explained Example:
Pasted at the end of .htaccess:
redirect 301 /old/categorystructure http://www.domain.com/new/categorystructure/ (the old urls did not have a backslash at the end)
Result:
Code:
http://www.domain.com/new/categorystructure?linkurl=/alter/ordner
I search someone who could find the right syntax of a mod_rewrite rule to work this problem out.
It is urgent.
Thank you for your replies.