php - Rewrite an url with htaccess -
i rewrite url
http://mydomain/index.php?s=profil
to
http://localhost/profil
i have seek in .htaccess:
rewriterule ^([^/]*)$ /index.php?s=$1 [l]
but not work (error 500).
i guess wanted url http://urdomain.com/profile show content http://urdomain.com/index.php?s=profil, illustration of how this:
rewriteengine on rewritebase / rewriterule ^content/([a-za-z0-9-]+)/?$ index.php?s=$1 [nc,l]
this rule redirect page urdomain.com/content/alphanumeric123 index.php?s = $1
explaination:
[a-z] - lower case characters [a-z] - upper case characters [0-9] - numbers
php apache
No comments:
Post a Comment