Home Redirect all websites of a subdirectory to one single website (actually two, one for each language)
Reply: 0

Redirect all websites of a subdirectory to one single website (actually two, one for each language)

user1282
1#
user1282 Published in June 25, 2018, 12:02 am

im trying to do the following: I have a website with an English version and a German version. Now I'm trying to redirect the English visitors to an English page and the German visitors to the German page.

The URLs of the English version look like this: example.com/en/some-page The URLs of the German version look like this: example.com/some-page

I'm trying to get a temporary redirection (302?) for all my pages, so every English page (URLs starting with example.com/en/) should be redirected to example.com/en/english-announcement and all German pages (URLs starting with example.com) should be redirected to example.com/german-announcement. The visitors should not be able to access any other page than either example.com/german-announcement or example.com/en/english-announcement.

Maybe it's worth mentioning that it is a wordpress page, so there is a default .htaccess file that looks like this:

RewriteOptions inherit
<IfModule mod_rewrite.c>
RewriteEngine On 
RewriteBase / 
RewriteRule ^index\.php$ - [L] 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule . /index.php [L] 
</IfModule>

If you could tell me how to do this I'll be eternally grateful.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.310081 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO