Rajan
Rajan

Reputation: 21

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 under 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.

Upvotes: 2

Views: 389

Answers (2)

Ryan Fernandes
Ryan Fernandes

Reputation: 8526

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

Upvotes: 1

Igor Zinov'yev
Igor Zinov'yev

Reputation: 3706

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>

Upvotes: 1

Related Questions