Home rewrite rule to remove file extention and action
Reply: 0

rewrite rule to remove file extention and action

user620
1#
user620 Published in May 23, 2018, 4:18 pm

I'm trying to create a rewrite rule to remove file extention and action from it.

For example this url:

password.php?action=new

should be rewritten as:

password/new 

I am trying following:

RewriteRule ^password/([a-zA-Z]+)/?$ /password.php?action=$1 [L,QSA]

It does not seem to work.

Also instead of specifying password.php file, how can i generalize it for every file? For example

file1.php?action=edit
file1/edit

file2.php?action=something
file2/something
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.320217 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO