Problem in enabling mod_rewrite in Ubuntu
I am trying to change from windows to linux server. And for that i am trying to enable mod_write in ubuntu. I have taken all the necessary steps to enable the mod_rewrite as mod_rewrite is displayed unde开发者_如何学JAVAr loaded modules. I have set all the permissions for the .htacess file. But for some reason the rewrite does not appear to be working in the linux server. It was working fine while i was using the same code in windows server.
Can anyone please help me in this issue. Your help will be really appreciated.
Thanks. Rajan.
Check if you have the AllowOverride
directive set to None
. This is usually done in a file which sets your VirtualHosts
NameVirtualHost 192.168.0.1:80
<VirtualHost 192.168.0.1:80>
ServerName some.local.site
DocumentRoot /home/user/site
<Directory /home/user/site>
AllowOverride None <-- set this to All
</Directory>
</VirtualHost>
If setting AllowOverride
to ALL
didn't work, you might want to debug mod_rewrite like so:
add after RewriteEngine On
RewriteLog "/var/log/httpd/mod_rw.log"
RewriteLogLevel 9
精彩评论