I'm brand new to writing mod_rewrites and could use some help. I have a directory like this in my site:
http://domain.com/de
This goes to our German site. Domain.de points to the /de folder. So how do I write a mod_rewrite rule that will redirect like this:
domain.com/de/contact-us => domain.de/contact-us
domain.com/de/markets => domain.de/markets
domain.com/de/materials => domain.de/materials
Etc.
If you could provide the full mod_rewrite that would be great. 开发者_运维技巧This noob would greatly appreciate it. Thanks.
This will redirect any request to the de folder to your *.de domain.
RewriteEngine On
RewriteCond %{HTTP_HOST} ^domain.com$ [NC]
RewriteRule ^/de/(.*)$ http://domain.de/$1 [L]
精彩评论