Hi.
I just can’t get my RewriteRule 301 to work as I want.
I don’t want to make fancy patterns, just tell the server that “this old url” is now “this new url on an other domain with an other url”.
Before I had two servers running Wordpress, one for english (.com) and one for Swedish (.se). After the switch to Kirby I now use the super nice Multilanguage feature to host both language on the .com domain. The site also got a complete new look and structure so a lot of the old urls does not exist or have new names/urls.
This is my .htaccess on the .se server (old domain):
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^$ http://www.new-domain.com/se? [R=301,L]
RewriteRule ^produkter/$ http://www.new-domain.com/se/produkter/? [R=301,L]
RewriteRule ^produkter/resolut-mrm-portal/$ http://www.new-domain.com/se/produkter/marketing-portal/marketing-portal? [R=301,L]
</IfModule>
When I go to www.old-domain.se/produkter/ or www.old-domain.se/produkter/resolut-mrm-portal/ I get an 404 instead for being redirected to the new url.
I have also tried to use Redirect 301 instead of RewriteRule:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^$ http://www.new-domain.com/se? [R=301,L]
Redirect 301 /produkter/ http://www.new-domain.com/se/produkter/
Redirect 301 /produkter/resolut-mrm-portal/ http://www.new-domain.com/se/produkter/marketing-portal/marketing-portal/
</IfModule>
This works a little bit. the First Redirect (/produkter/) works fine but mess upp the other. If I now go to www.old-domain.se/produkter/resolut-mrm-portal/ the server redirect me to http://www.new-domain.com/se/produkter/resolut-mrm-portal/ wish of course does not exist…
I just want a simple redirect… Hope some one can help.