Hessel Posted February 16, 2010 Share Posted February 16, 2010 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 More sharing options...
grlayouts Posted February 16, 2010 Share Posted February 16, 2010 have you moved the htaccess script file into the folder /example or only in the main directory? Link to comment https://forums.phpfreaks.com/topic/192262-language-redirect/#findComment-1013185 Share on other sites More sharing options...
Hessel Posted February 16, 2010 Author Share Posted February 16, 2010 The script itself works fine. It's in the main directory Link to comment https://forums.phpfreaks.com/topic/192262-language-redirect/#findComment-1013198 Share on other sites More sharing options...
grlayouts Posted February 16, 2010 Share Posted February 16, 2010 have you tried making a copy to the folder requested ie www.mysite.com/example it may not pick up the htaccess from the main directory Link to comment https://forums.phpfreaks.com/topic/192262-language-redirect/#findComment-1013240 Share on other sites More sharing options...
Hessel Posted February 18, 2010 Author Share Posted February 18, 2010 I found the problem... Link to comment https://forums.phpfreaks.com/topic/192262-language-redirect/#findComment-1014307 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.