.htaccess 重写角色不适用
我有php网站,我已经创建了.htaccess文件。我有两条规则。一个用于force www,另一个用于permalink 我想更改以下Url.htaccess 重写角色不适用,.htaccess,mod-rewrite,url-rewriting,permalinks,pretty-urls,.htaccess,Mod Rewrite,Url Rewriting,Permalinks,Pretty Urls,我有php网站,我已经创建了.htaccess文件。我有两条规则。一个用于force www,另一个用于permalink 我想更改以下Url http://www.yatha.tv/play.php?vid=1437&id=1 到 但这一规则并没有改变 RewriteRule ^([^/]*)/([^/]*)\.html$ /play.php?vid=$1&id=$2 [L] 上面的规则-^.*$-将始终首先匹配。@Marty否,只有当RewriteCond为true时才匹
http://www.yatha.tv/play.php?vid=1437&id=1
到
但这一规则并没有改变
RewriteRule ^([^/]*)/([^/]*)\.html$ /play.php?vid=$1&id=$2 [L]
上面的规则-^.*$-将始终首先匹配。@Marty否,只有当RewriteCond为true时才匹配。@hjpotter92哦,是的,你是对的。
RewriteRule ^([^/]*)/([^/]*)\.html$ /play.php?vid=$1&id=$2 [L]
<IfModule mod_rewrite.c>
Options +FollowSymLinks
Options +Indexes
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^yatha\.tv$
RewriteRule ^(.*)$ http://www.yatha.tv/$1 [R=301,L]
RewriteRule ^([^/]*)/([^/]*)\.html$ /play.php?vid=$1&id=$2 [L]
</IfModule>