I am trying to introduce seo friendly url in my site. I would like to change the url: http://www.example.com/usa/searched-page.php?ad-id=57
RewriteEngine On
RewriteRule ^searched-page/([a-zA-Z0-9]+)/$ searched-page.php?ad_id=$1
But the code is not working. I can not find out where I am going wrong. Please..
I am assuming mod-rewrite is on and you are using below rule in usa directory, try as below.
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^searched-page/([a-zA-Z0-9]+)/$ searched-page.php?ad-id=$1 [L]
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.