Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

I am using Cent OS hosted on VPS. I want to have the feature of "Use URL rewriting of joomla". On enabling this in joomla, it gives a message "Rename .htaccess.txt to .htaccess".

I have renamed the file but on opening the website, browser throws 404 error. The rewrite module is perfectly loaded and for testing redirection, when I add the below in the httpd.conf, the redirection works perfectly. I think, the htaccess file is not being read. I have also added the AllowOverride All in the directory setting of my virtual host but nothing changes.

Code Added to httpd.conf:

RewriteEngine On
Options +FollowSymLinks
RewriteRule ^joomla\.html [R=301,L]

My question: Where exactly do we need to add AllowOverride All in httpd.conf ? In the directory /var/www/html or my joomla site document root which is /home/admin/mysite

Also does joomla use .htaccess to enabling url rewriting? What if we dont want to use .htaccess and only use httpd.conf

Thanks, Vineet

share|improve this question

To allow .htaccess you need add this in httpd.conf but under the module which is configured to server your website.

AllowOverride All

Editing root httpd.conf not advisable but on the other hand allowing htacess is also not advisable can use vhost configuration and add configuration regarding your website there.It will add extra layer of security on server.

share|improve this answer

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.