Linked Questions

Popular Questions

I need a rewrite rule or some other solution for accessing pages like


which lies at the same webspace as

From the beginning:

I have a domain 

with multi language content which is triggered by a language GET parameter.

For instance: 

will load the french content from the database, whereas 

displays the default English content.

For SEO friendly clean urls I created the following universal htaccess rewrite rule:

RewriteRule ^/?(.*)/(.*).php /$2.php?lang=$1 [L,QSA]

This will make urls like

be accessible from the SEO friendly version:

Also other languages like

are covered by this and can be accessed by the clean url

What I need is a solution for the special case for the German language, because for the German language I have a dedicated domain called So it should not be accessible by a path-url like 

as the other languages, but instead from

I probably have to point the domain target of to the same webspace as, since they share the same php files, stylesheets and images.

I don't know how to edit the htaccess file to cover the .de domain as well.

Please consider, that in addition to the hidden lang parameter, there are some pages, which need to pass some GET parameters too. They don't need to be hidden. They just need to be passed. So for instance

should be accessible from

My current htaccess RewriteRule already covers the additional parameters for the .com/x/ domain by [L,QSA] at the end. But I don't know how to set it up to cover access from the .de domain, including the ocationally occuring GET parameters.

It should be a universal solution. So I should not have to enter a line for every of my php files, but instead it should cover all php filenames, as the already existing RewriteRule from above already does for the .com domain.


Related Questions