我希望我的 URL 像http://www.domainname.com/Seagate-abc-Buyout-22.html
,但我的重写规则不适用。你发现有什么不对吗?
Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.Domainname\.com
RewriteRule ^(.*)$ http://www.domainname.com/$1 [R=permanent,L]
RewriteRule ^([^-]*)-([^-]*)\.html$ /final.php?title=$1&sid=$2 [L]