开发者

.htaccess help, not working when I changed servers

I am not very familiar with .htaccess and have already searched through the net but couldn't find an explanation to what I have

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]

This is an .htaccess to what I am building, this worked before on a GoDaddy server but when changed server, it wont work any more.

Let say http://www.mywebsite.com/home worked before, because if you can see mpage=$1 it replaces the 开发者_如何学Cget to the one on slash right? But when I change servers it will see a 404 error.

Any ideas what it could be?


make sure you have the apache rewrite module enabled, and that AllowOverride is set to All in your vhost config

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜