我有一个看起来像这样的超链接:如何让浏览器在重写时显示干净的URL?
http://domain.com/sample/comments/65
当我点击它,它进入这个:
http://domain.com/sample/comments/index.php?submissionid=65
我使用重写规则,使之做到这一点。这是我想要的,除了我还希望浏览器中显示的URL仍然看起来像“http://domain.com/sample/comments/65”。
我该怎么做? .htaccess文件显示在下面。
RewriteEngine on
RewriteRule ^comments/([0-9]+)?$ http://domain.com/sample/comments/index.php?submissionid=$1 [NC,L]
由于提前,
约翰