【发布时间】:2014-07-17 06:34:58
【问题描述】:
我想让这个 URL 变得干净: news.php?post=13 但是当我尝试使用这个 RewriteRule 时:
RewriteRule ^(news)\/([0-9]+)\/?$ news.php?post=$2它只显示新闻页面,没有帖子内容。 过去2天一直困扰着我,我无法弄清楚。有人可以帮我解决这个问题吗?
这是整个 Htaccess
重写引擎开启 RewriteRule ^(news)\/([0-9]+)\/?$ news.php?post=$1 RewriteRule ^(verify)/(.*)/([a-zA-Z0-9_-]+)$ validate_account.php?usr=$2&hash=$3 [QSA,L] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f 重写规则 ^(.*)$ $1.php【问题讨论】:
标签: php apache .htaccess url-rewriting