我試圖從URL重寫:PHP
products.php?id=1
到
product-1.html
我在我的本地服務器 試過這種重寫URL,我使用WAMP服務器上的Windows7
和這個我的htaccess文件內容
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^product-([0-9]+)\.html$ products.php?id=$1
,這我products.php文件內容
<a href="products.php?id=1">show rewrite url</a>
我的httpd.conf組從
#LoadModule rewrite_module modules/mod_rewrite.so
到
LoadModule rewrite_module modules/mod_rewrite.so
後,我重新啓動WAMP服務器 但問題仍然出現和dosenot工作
http://www.up.ma//uploads/images/up.macbeea0c9ed.png
所以當你打開這個鏈接它給你什麼?[http://127.0.0.1/product-1.html](http://127.0.0.1/product-1.html) – safarov 2012-03-25 13:10:20