【发布时间】:2014-03-08 09:05:49
【问题描述】:
我正在尝试将网站从一台主机迁移到另一台主机。当前主机具有非常旧版本的 PHP、Apache 和 MySQL。我在测试 Win XP VM 上安装了所有相同版本。该网站的 htaccess 如下所示:
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^test\.com [NC]
RewriteRule ^(.*)$ http://www.test.com/$1 [L,R=301]
RewriteRule ^(sales) index.php?main_page=page&id=2
RewriteRule ^(support) index.php?main_page=page&id=3
RewriteRule ^(about_me) index.php?main_page=page&id=4
RewriteRule ^(help) index.php?main_page=page&id=5
RewriteRule ^(site_map) index.php?main_page=site_map
谁能告诉我需要在 httpd.conf 中启用哪些选项才能正确重定向?目前,主页显示,但从主页菜单栏中单击的任何链接都显示错误。例如,在此服务器上找不到请求的 URL /sales。
【问题讨论】:
标签: apache .htaccess windows-xp httpd.conf