.htaccess - htaccess mod_rewrite to example.com/tut/2 -


i need convert link in website way :

wwww.example.com/tut/1 

from

wwww.example.com/tut.php?v=1 

i tried alot of way no thing happen

my code

rewriteengine on rewriterule ^tut/(\d+) tut.php?v=$1 [qsa,l] 

is there other idea or code ??

you can use code in root .htaccess:

options -multiviews rewriteengine on rewritebase /  rewritecond %{the_request} /tut\.php\?v=(\d+) [nc] rewriterule ^ /tut/%1? [r=302,l,ne]  rewriterule ^tut/(\d+)/?$ tut.php?v=$1 [qsa,l,nc] 

Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -