Jump to content

language redirect


Hessel

Recommended Posts

I have a .htaccess script like:

 

RewriteRule ^([a-z]{2})/(.*).html page_agent.php?lang_sign=$1&page_name=$2 [QSA,L]

RewriteRule ^([a-z]{2})/(.+)/?$ $2 [QSA,L]

 

The first RewriteRule i use for the language sign like 'de' or 'uk'

The second RewriteRule  is for the other files

 

http://www.<domain>/<lanuage sign>/<page>.html

 

Works perfect but.

 

If the url is http://www.<domain>/<page>.html i get an error becaurce i did not include a language sign

 

Does anyone knows how to fix this. I think a RewriteCond with the exeption. but how

 

 

Link to comment
https://forums.phpfreaks.com/topic/192262-language-redirect/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.