I would like to short my URLs via mod_rewrite .
There are two types of URL on my website: One time with parameter and without parameters.
I would like to call the sites like:
This is what I have write right now…
eg
RewriteRule devel/images/(.*)?$ devel/pages/images.php?event=$1
How is it possible as to do it on the right way?
You can use these 2 generic rules in site root .htaccess:
RewriteEngine On
RewriteRule ^devel/([\w-]+)/([\w-]+)/?$ devel/pages/$1.php?event=$2 [L,QSA,NC]
RewriteRule ^devel/([\w-]+)/?$ devel/pages/$1.php [L,NC]
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.