Forum Moderators: phranque
I wan't to redirect (outdated) entries in google to the new content page.
the old link is like this:
[domain.com...]
and my current (not working) rule is this:
rewriteEngine on
RewriteRule ^/languages/traxx.php?lang=([a-z]{2})&sec_lang=([A-Z]{2}) /products.php?lang=$1-$2 [L,R=permanent]
What's I have similar working rule (I think)
Anyone an idea?
Regards Olaf
RewriteEngine on
RewriteCond %{QUERY_STRING} lang=([a-z]{2})&sec_lang=([A-Z]{2})
RewriteRule ^/languages/traxx.php$ /products.php?lang=%1-%2 [L,R=permanent]
Hope this helps.
There is some more information in the library and charter that might be helpful also.
Justin
I use this (working) rules in the same file:
Options +FollowSymLinks
rewriteEngine on
RewriteCond %{SERVER_NAME} ^www\.example\.de$ [NC]
RewriteRule ^$ main.php?lang=de-DE [L]
RewriteCond %{SERVER_NAME} ^www\.example\.nl$ [NC]
RewriteRule ^$ main.php?lang=nl-NL [L]
rewriteCond %{SERVER_NAME} ^(www\.)?example\.com$
rewriteCond %{REQUEST_URI} ^/home.php [OR]
rewriteCond %{REQUEST_URI} ^/bergtoys.php [OR]
rewriteCond %{REQUEST_URI} ^/games.php [OR]
rewriteCond %{REQUEST_URI} ^/faq.php [OR]
rewriteCond %{REQUEST_URI} ^/kleurplaten.php [OR]
rewriteCond %{REQUEST_URI} ^/producten.php [OR]
rewriteCond %{REQUEST_URI} ^/spreekbeurt.php [OR]
rewriteCond %{REQUEST_URI} ^/zeurtips.php [OR]
rewriteCond %{REQUEST_URI} ^/workouts.php
RewriteRule .* [kids.bergtoys.com%{REQUEST_URI}...] [L,R=permanent]
The first two are suggested from you.
[edited by: jdMorgan at 2:27 am (utc) on Jan. 13, 2006]
[edit reason] examplified per TOS. [/edit]
RewriteEngine on
RewriteCond %{QUERY_STRING} ^lang=([a-z]{2})&sec_lang=([A-Z]{2})
RewriteRule [b]^la[/b]nguages/traxx.php$ /products.php?lang=%1-%2 [L,R=permanent]
Jim