Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question

migrated from stackoverflow.com Jan 31 '12 at 18:51

This question came from our site for professional and enthusiast programmers.

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
ok thanks.i will try this. – Bruno Thileeban Jan 31 '12 at 17:35

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)
share|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 posting your answer, you agree to the privacy policy and terms of service.

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