Apache .htaccess帮助,在我更改服务器时不工作
我不太熟悉.htaccess,已经在网上搜索过了,但是 找不到对我所拥有的东西的解释Apache .htaccess帮助,在我更改服务器时不工作,apache,.htaccess,mod-rewrite,Apache,.htaccess,Mod Rewrite,我不太熟悉.htaccess,已经在网上搜索过了,但是 找不到对我所拥有的东西的解释 RewriteEngine On DirectoryIndex index.php RewriteRule ^([a-zA-Z0-9_-]+)$ index.php?mpage=$1 RewriteRule ^([a-zA-Z0-9_-]+)/$ index.php?mpage=$1 RewriteRule ^search-result/([^/\.]+)$ index.php?mpage=search-res
RewriteEngine On
DirectoryIndex index.php
RewriteRule ^([a-zA-Z0-9_-]+)$ index.php?mpage=$1
RewriteRule ^([a-zA-Z0-9_-]+)/$ index.php?mpage=$1
RewriteRule ^search-result/([^/\.]+)$ index.php?mpage=search-result&subpage=$1 [L]
RewriteRule ^search-result/([^/\.]+)/(.*)$ index.php?mpage=search-result&subpage=$1&act=$2 [L]
RewriteRule ^online-result/([^/\.]+)$ index.php?mpage=online-result&subpage=$1 [L]
RewriteRule ^online-result/([^/\.]+)/(.*)$ index.php?mpage=online-result&subpage=$1&act=$2 [L]
这是一个.htaccess来访问我正在构建的内容,它以前在GoDaddy服务器上工作过,但是
当更换服务器时,它将不再工作
比方说http://www.mywebsite.com/home 以前工作过,因为如果你能看到mpage=$1,它会取代斜杠上的get?但当我更换服务器时,它将看到404错误
有什么想法吗?确保启用了apache重写模块,并且在vhost配置中将AllowOverride设置为All确保启用了apache重写模块,并且在vhost配置中将AllowOverride设置为All服务器可能无法识别.htaccess文件。有关更多信息,请参阅。Apache是否配置为读取.htaccess?AllowOverride指令是否设置为所有?为什么会有标签?很抱歉这些标签是stackoverflow新增的,Godaddy说Linux主机启用了apache重写模块,但我尝试使用google重定向示例,但没有效果。服务器可能无法识别.htaccess文件。有关更多信息,请参阅。Apache是否配置为读取.htaccess?AllowOverride指令是否设置为所有?为什么会有标签?很抱歉,stackoverflow的新标签,Godaddy说Linux主机启用了apache重写模块,但我尝试使用google重定向示例,但没有效果。Godaddy说他们启用了,但不确定为什么它不起作用,因为在我的PC本地主机和旧服务器上它可以工作,如果godaddy给你带来问题,你可以在rackspace cloud上设置一个cloudserver,每月10美元,你可以根据自己的喜好进行配置。godaddy说他们已经启用了,但不确定为什么它不工作,因为在我的PC localhost和旧服务器上它可以工作,如果godaddy给你带来了问题,你可以在rackspace cloud上安装一个cloudserver,每月10美元,你可以根据自己的喜好配置它。