.htaccess没有在linux上工作
I have defined some URL Rewriting rules in .htaccess file
Its working fine on localhost in windows
But when I uploaded it on server that is linux based, it stopped to work I have found the problem on this link
Files and directory names starting with a dot are treated as hidden files by Unix, Linux & Mac. The htaccess file is hidden so it doesn’t distract from normal web content like HTML files. See hidden files for more information. Without the dot at the beginning, Apache will ignore the htaccess file.
But I did not find the solution ...
我在.htaccess文件中定义了一些URL重写规则 p>
它的工作原理 在windows中的localhost上很好 p>
但当我将它上传到基于linux的服务器上时,它停止工作 我发现了这个问题 link p>
以点开头的文件和目录名称被视为隐藏文件 Unix,Linux& 苹果电脑。 htaccess文件是隐藏的,因此它不会分散像HTML文件这样的普通Web内容。 有关详细信息,请参阅隐藏文件。 如果没有开头的点,Apache将忽略htaccess文件。 p> blockquote>
但我没有找到解决方案...... p> div>
make sure that AllowOverrides is enabled (AllowOverrides all) in httpd.conf (many distribs have default as none)
if it is not that, you may have to post the actual htaccess for more help
Make sure that module 'mod_rewrite' is loaded in your server. To check this use phpinfo() and then search for 'loaded modules'.