【发布时间】:2018-08-03 18:23:05
【问题描述】:
这是我的.htaccess 文件
RewriteCond %{REQUEST_FILENAME} !-f
<FilesMatch “.(ttf|otf|eot|woff)$”>
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin “domain.com”
</IfModule>
</FilesMatch>
Options +FollowSymLinks -MultiViews
RewriteEngine On
RewriteRule ^[A-Za-z-]+/([A-Za-z0-9-]+)/?$ viewpost.php?id=$1 [QSA,NC,L]
RewriteRule ^[A-Za-z-]+/([A-Za-z0-9-]+)/?$ category.php?id=$1 [QSA,NC,L]
除了第一个重写规则有效而第二个无效。
【问题讨论】:
-
我不知道我错过了什么。
标签: apache .htaccess mod-rewrite url-rewriting