son Posted June 5, 2012 Share Posted June 5, 2012 I use mod-rewrite as:RewriteRule ^([A-Za-z0-9_-]+)$ webs.php?id=$1 [NC] It rewrites all URLs ok. However, I need to insert a language option (Italian and English) and this does not work due to rewrite rule. Has anyone experience and let me know how to change my rewrite rule? Thanks,Son Link to comment Share on other sites More sharing options...
boen_robot Posted June 5, 2012 Share Posted June 5, 2012 How do you want the language to appear in the URL? As a query string parameter, before the main path, after the main path?It's easiest if you want it in the query string: RewriteRule ^([A-Za-z0-9_-]+)$ webs.php?id=$1 [NC,QSA] 1 Link to comment Share on other sites More sharing options...
son Posted June 6, 2012 Author Share Posted June 6, 2012 On query string is fine. It is only for language swap anyway, lang is then stored in session... Thanks a lot, S Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now