.htaccess 重写导致 404 错误
我正在尝试使用以下 .htaccess 创建搜索引擎友好的 URL,无论我尝试什么,它都会定向到 404 错误页面。
如果有什么不同的话,这是在 Host Gator 共享帐户上。该目录是(文档根)/blog,.htaccess 文件位于目录“blog”中。
示例 URL 为 http://examplesite.com/blog/category/announcements
。这是 .htaccess 文件内容:
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^category/([a-zA-Z0-9]+)/$ index.php?category=$1
您知道为什么会发生这种情况吗?
I am trying to create search engine friendly URLs with the following .htaccess and it is directing to a 404 error page no matter what I try.
This is on a Host Gator shared account, if it makes any difference. The directory is (document root)/blog, the .htaccess file is located in the directory "blog."
Example URL would be http://examplesite.com/blog/category/announcements
.Here is the .htaccess file contents:
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^category/([a-zA-Z0-9]+)/$ index.php?category=$1
Any ideas why this is happening?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
忘记前面的斜杠了吗?
Forget the preceeding slash?