【发布时间】:2014-07-25 11:00:28
【问题描述】:
SecFilterEngine Off
DirectorySlash Off
Options -Indexes
ErrorDocument 404 /not-found.php
ErrorDocument 403 /not-found.php
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^xyz.com.au$ [NC]
RewriteRule ^(.*)$ http://someurl.au/$1 [R=301,L]
# RewriteCond %{QUERY_STRING} ^.+$
# RewriteRule ^$ ? [R=301,L]
RewriteRule ^news_and_events.asp news-and-views? [NC,R=301,L]
RewriteRule ^detailapplication.asp products/applications? [NC,R=301,L]
RewriteRule ^detailproduct.asp products/products? [NC,R=301,L]
RewriteRule ^detailproduct.asp products/products? [NC,R=301,L]
RewriteRule ^products.asp products/products? [NC,R=301,L]
此代码在服务器上正常工作,但在本地主机上不工作。请有人告诉我必要的更改。在那个 url 中,我认为需要将该 url 更改为 localhost,我在那里添加了 localhost 但仍然无法正常工作,请告诉我问题
【问题讨论】:
-
也许你没有加载所有的 apache 模组来使用
SecFilterEngine甚至ModRewrite?如果你告诉我们什么是行不通的,这很好,例如。你得到一个Internal Server Error或者只是RewriteRules不工作...... -
服务器错误!错误号 500
-
看看我的第一条评论
-
我收到服务器错误500,请告诉我如何解决