試圖將前者的網址改寫爲後者。重寫該功能出於某種原因不起作用。怎麼修?謝謝。htaccess mod url rewrite not working
www.example.com/example-example.html
www.example.com/example-example/
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^([a-z]+-?[a-z]+)/$ /$1.html
嘿謝謝,但仍然因爲某些原因無法使用。還有什麼我應該做的?我的域目錄中有.htaccess文件,粘貼了以下行,但URL保持不變。 – 2013-03-23 09:15:45
apache?如果是,請檢查指令'AllowOverride'並將其設置爲'All'以進行您的域配置 – mkjasinski 2013-03-23 11:00:18