.htaccess - mod rewrite, string instead of numerical value in the url -
I am trying to rewrite the mods so that instead of me
now I know that How can the URL for numerical value like Company.com/page.php?id=2 I have company.com/2
It can be done by rewriting .htaccess: RewriteRule ^ ([0- 9] +) /? $ Page php? Title = $ 1 [NC, L]
How can I get this now? Thanks!
You need to zoom your regex to allow alpha-numerics:
RewriteEngine On RewriteRule ^ ([a-z0- 9] +) /? $ Page.php? Title = $ 1 [NC, L, QSA]
Comments
Post a Comment