【发布时间】:2018-06-08 13:21:40
【问题描述】:
我正在做一个需要 SEO 的项目,对于 SEO,它需要用户友好的 URL,我想让我的 url 看起来对用户友好,这是我的 .htaccess 代码,我想让我的 url 看起来像:
http://localhost/footboleh/article/Some-text
虽然目前它看起来像:
http://localhost/footboleh/article?url=Some-text
.ht访问代码:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ article.php?url=$1 [QSA,L]
我尝试了一些重写规则,这些规则是
RewriteRule ^(.*)$ article.php?url=$1 [QSA,L]
它给我带来了没有 css 和 js 的索引页面,并在控制台中给出错误 控制台错误:
Uncaught SyntaxError: Unexpected token
我有 print_r ($_GET] 它的节目:
数组([url] => 文章/some-text.php)
【问题讨论】: