【问题标题】:Internal Server Error When I try to access admin url (home page is working)当我尝试访问管理 url 时出现内部服务器错误(主页正在工作)
【发布时间】:2013-01-04 02:44:37
【问题描述】:

我正在处理 .htaccess 文件,前端工作正常。但是当我尝试访问管理员时,它给了我内部服务器错误。它是一个定制的 mvc 框架。

这是我的 .htacess 文件

DirectoryIndex index.php

Options -Indexes

Options +FollowSymlinks
Options -MultiViews
ErrorDocument 404 /sitemap.php
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HOST} ^vividtron.demolocation.com [NC]

RewriteRule ^index.htm$ /index.php [NC]
RewriteRule ^all-category.htm$ /all-category.php [NC]
RewriteRule ^brands.htm$ /brands.php [NC]
RewriteRule ^search.htm$ /search.php [NC]

RewriteRule ^([_-a-zA-Z0-9]+)$ /sub-category.php?furl=$1 [NC]
RewriteRule ^customer-service.htm$ /customer-service.php [NC]
RewriteRule ^([_-a-zA-Z0-9]+).htm$    /static-page.php?furl=$1 [NC] 
RewriteRule ^offer/([_-a-zA-Z0-9]+).htm$    /special-offer.php?furl=$1 [NC]
RewriteRule ^pages/([_-a-zA-Z0-9]+).htm$    /popup-pages.php?furl=$1 [NC]

#RewriteRule ^category/([_-a-zA-Z0-9]+)$ /product-listing.php?surl=$1 [NC]
RewriteRule ^category/([_-a-zA-Z0-9]+)$ /featured-product.php?surl=$1 [NC]
RewriteRule ^brand/([_-a-zA-Z0-9]+)$ /product-series.php?burl=$1 [NC]
RewriteRule ^series/([_-a-zA-Z0-9]+)/([_-a-zA-Z0-9]+)$ /model-listing.php?burl=$1&surl=$2 [NC]
RewriteRule ^product/([a-zA-Z0-9_-]+)$ /product-detail.php?furl=$1 [NC]
RewriteRule ^([._-a-zA-Z0-9]+)/([_-a-zA-Z0-9]+)/([_-a-zA-Z0-9]+)$ /pro-detail.php?url=$1&proId=$2&bid=$3 [NC]
RewriteRule ^([._-a-zA-Z0-9]+)/([_-a-zA-Z0-9]+)$ /pro-detail.php?url=$1&proId=$2 [NC]

谢谢提前。请查看文件为什么 url http://vividtron.demolocation.com/admin/login.php 不起作用

【问题讨论】:

  • /admin/login.php 与 RewriteRules 无关......它是一个文件而不是重写的 url。
  • 请考虑添加一些RewriteConds,并且可能会随意洒一些[L] 标志,我什至无法理解那套规则。
  • 我猜,Apache的配置设置中没有启用重写模块。
  • 我建议在你的 php.ini 中打开 display_errors。我相信你会看到你的问题。

标签: php .htaccess


【解决方案1】:

您尝试过不同的主机吗?我的一个脚本总是向我显示内部服务器错误,但是当我切换主机时,它可以完美运行。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-05-11
    • 1970-01-01
    • 1970-01-01
    • 2018-12-15
    • 2019-06-22
    • 2018-10-08
    • 2018-05-20
    • 1970-01-01
    相关资源
    最近更新 更多