【发布时间】:2015-09-23 08:31:23
【问题描述】:
我想将我的 URL 设为 SEO 友好 URL。我尝试通过重写规则编辑.htaccess 文件
RewriteRule ^swift-details/([0-9]+)/([0-9a-zA-Z_-]+)$ swift-details.php?id=$1 [NC,L]
RewriteRule ^swift-details/(css|js|img)/(.*)?$ /$1/$2 [L,QSA,R=301]
它正在路由正确的 URL,但在该页面中 CSS JS 和图像不起作用。
示例网址:
http://www.example.com/swift-details/2/abblinbb
【问题讨论】:
-
另请参阅网站管理员堆栈上的以下问题:.htaccess rewrite URL leads to missing CSS
标签: php html css apache .htaccess