.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

Popular posts from this blog

python - how we can use ajax() in views.py in django? -

matlab - Using loops to get multiple values into a cell -

python - Sequence Pattern recognition with Pybrain -