English 中文(简体)
阿帕奇·Mod Rewrite向“老板结构”转变
原标题:Apache Mod Rewrite change querystring to "Folder Structure"

• 对每个人进行报复。

I have a current url: http://localhost/product/?product_id=12&slug=state-of-trance-2011

I need to change it to: http://localhost/product/12/state-of-trance-2011

实现这一目标的最佳途径是什么?

关于

最佳回答

将这一守则列入您的网址:

RewriteEngine On
RewriteBase /
RewriteRule ^product/([0-9]+)/([a-z0-9-_]+)/?$ product/?product_id=$1&slug=$2 [NC,QSA,L]
问题回答

暂无回答




相关问题
Using SimplePie with CodeIgniter and XAMPP

I am using CodeIgniter 1.7.2 with XAMPP 1.7.2 on a Windows computer. I am trying to make use of SimplePie. I followed all the instructions I could find: a copy of simplepie.inc is in my applications/...

Multiple Sites with common files

I have developed over 50 sites that all use the exact same files other than CSS and IMAGES, I currently duplicate the files each time I create a new site and upload different css and images. What ...

http server validation

I finish a litle http server, writing from scratch. I would like to be sure that my imlementation is conforme to the HTTP specifications. W3C give us tools for HTML/XML conformance, but i see nothing ...

热门标签