.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

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -