what is solution to create a .htaccess file in vps. I have tried most of the .htaccess file.but it doesnt work in vps. What is the solution?

here is the code of htaccess file.

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]

this is not working in vps.

  • 1
    Have you checked that any htaccess overrides are being honored? You might want to check httpd.conf to make sure that AllowOverride is set to allow this and that AccessFileName .htaccess is set. – Ben D Jan 31 '12 at 17:01

Two possible reasons:

  1. Make sure that you've activated the module rewrite (a2enmod rewrite)
  2. Check your httpd.conf overriding should be allowed. (e.g replace AllowOverride none with AllowOverride all)
| improve this answer | |
  • why this happend in vps. – Bruno Thileeban Jan 31 '12 at 17:41
  • I don't know. Who has set up your vps? – Sam Jan 31 '12 at 17:53
  • ok thank you very much.this is very useful for me. – Bruno Thileeban Jan 31 '12 at 17:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.