我正在处理我的项目,现在我想将其从本地主机传输到服务器。一切似乎工作正常,但.htaccess不起作用。.htaccess无法在我的服务器上工作
服务器应该支持mod_rewrite和print_r(apache_get_modules());显示mod_rewrite正在运行。
但尽管如此,当我输入myaddress.com/contact,它显示错误404
下面是.htaccess文件,但它应该是很好的,因为它运行在我的本地:
RewriteEngine on
RewriteRule ^adminator/?$ adminator/login.php [L]
RewriteRule ^([^/\.]+)/([^/\.]+)/?$ index.php?page=$1&detail=$2 [L]
RewriteRule ^([^/\.]+)/?$ index.php?page=$1 [L]
你有什么想法吗?
谢谢,迈克。
嗯,这是周六,所以我我必须等待星期一,但我可以在哪里检查配置? – Mike 2010-06-19 16:18:15
在/ etc中搜索。例如'/ etc/httpd/conf/httpd.conf'。如果您没有ssh访问权限,请使用'glob()'和'file_get_contents()'。 – Mewp 2010-06-19 16:20:56