php - RewriteEngine to hide extension ?lang="xx" -


how can rewrite url using .htaccess?

or hide ?lang=es.

http://website/services?lang=es  

to:

http://website/services/es 

try in .htaccess file:

<ifmodule mod_rewrite.c>   rewriteengine on   rewriterule ^services/([a-za-z]{2})/?$ /services?lang=$1 [qsa,l]  </ifmodule> 

Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -