mardi 28 avril 2015

Apache URL rewrite rule and regex

probably my question duplicate with an other title but, I have read too many title and checked many times with google. So if it duplicates, I am sorry.

Now I have an URL:

http://ift.tt/1DT7Vjf

I am using this URL rewrite rule:

RewriteRule ^([A-Za-z0-9-_]+)/?$    profile.php?username=$1 [NC,L]

And I can change my url like:

http://ift.tt/1gQRvOD

Then, I need to update my url with an other get parameter:

http://ift.tt/1DT7XYj

At this part, I have an URL like:

http://ift.tt/1GE6BaU

I have tried this URL rule for the url for above:

RewriteRule ^([A-Za-z0-9-_]+)/?$/?$    profile.php?username=$1&w=$2 [NC,L]

But It does not work. Please help.

Thank you very much.

Aucun commentaire:

Enregistrer un commentaire