php - htaccess rewrite rule config -


i configure htaccess rewrite rules have difficulties.

my rule simple:

domain/sl --> index.php?lang=sl domain/en --> index.php?lang=en domain/it --> index.php?lang=it domain/de --> index.php?lang=de 

so added in htaccess simple rule:

    rewriteengine on     rewriterule ^([a-za-z0-9]+)/?$ index.php?lang=$1 [l] 

and partial working.

works if type

  domain/sl    domain/it  

doesn't work for

  domain/en    domain/de  

for 2 generates

  /domain/en/?lang=en or /domain/de/?lang=de  

and don't know why.

is de or en reserved word or what?

regards, igor

i believe should work, wish do.

rewriteengine on rewriterule ^([a-za-z]{1,})/?$ index.php?lang=$1 [l] 

Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -