0

I have a Multilanguage-Website with 2 domains like www.domain.com and www.domain.de

Now I want to define some RewriteRules like:

RewriteRule ^category/(.*)$ http://www.domain.de/$1 [R=301,L]

But I dont know how I can change it to work for both domains at once. Changing that target just without the domain doesnt work.

Example:

RewriteRule ^category-[0-9]{1,4}/(.*) http://www.domain.de/category/$1 [R=301, L]

This would redirect the user to the .de-domain. Doesnt matter which domain he was on preview pages. So visitors from domain.com would be suddenly on domain.de on some specific pages with this rule.

I want this rule to work for both domains and dont know how to write the target path.

1 Answer 1

1

I found a solution.

RewriteBase / and RewriteRule without domain

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.