Jump to content

Mod rewrite with language option


son
 Share

Recommended Posts

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

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]

  • Like 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...