问题
I would like to redirect my Dutch website.nl to website.com/nl/
But can't seem to find the right code to do this in htaccess.
Can someone help me with this?
回答1:
Try this rule as your first rule:
RewriteCond %{HTTP_HOST} ^(www\.)?website\.nl$ [NC]
RewriteRule ^(.*)$ http://website.com/nl/$1 [L,NC,R=301]
来源:https://stackoverflow.com/questions/21392391/wordpress-htaccess-redirect-top-level-domain-to-directory