我想在这里重写我的动态网址是关于它的一些信息。动态网站的URL重写
整个数据来自单个表,没有其他表创建。 URL重写在Apache服务器上处于活动状态。
我目前的URL
http://www.example.com/list.php?city=Mumbai&business_category=Accounting+services
预期网址
http://www.example.com/Mumbai/Accounting-services
我的代码
RewriteEngine On # Turn on the rewriting engine
RewriteRule ^([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/?$ list.php?city=$1&business_category=$2 [NC,L] # Process product requests
其实看起来不错。什么不工作? – colburton
我的网址没有任何事情发生,它保持不变。 –
您是否期望当前网址被输入到地址栏时转换为预期网址? – RamRaider