【发布时间】:2018-07-11 17:01:14
【问题描述】:
我的博客有帖子。当我单击阅读更多按钮时,我想重定向并显示选定的帖子。想要的网址是http://www.solutions.com/blog/blog-post/slug。
在 .htaccess 我有这个:
RewriteEngine on RewriteCond %{HTTP_HOST} ^solutions\.com
RewriteRule ^(.*)$ http://www.solutions.com/$1 [R=permanent,L]
RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}
!-f RewriteCond %{REQUEST_FILENAME}.html -f RewriteRule ^(.*)$
$1.html [L]
RewriteCond %{REQUEST_FILENAME} !-d RewriteCond
%{REQUEST_FILENAME}\.php -f RewriteRule ^(.*)$ $1.php
RewriteBase / RewriteRule ^blog/blog-post/(.+)
blog/blog-post.php?slug=$1
但我得到一个错误:
加载资源失败:服务器响应状态为 500 (内部服务器错误)
我该如何解决这个问题?
【问题讨论】:
-
有一个不错的 .htaccess 测试器,在这里查看htaccess.madewithlove.be