If your server does not rewrite properly then check the SELINUX property. This is for CentOS server.
If it's set to permissive or enable then apache mod_write does not work properly.
You should set the selinux to disabled mod and reboot the server. Then it should work fine.