Enable WordPress / Apache SEO URL’s on Fedora

by kjs last modified Jun 22, 2012 03:10 PM
— filed under:

Describes how to serve up SEO (friendly) URL’s via Apache on Fedora Linux.

Working for a UK SEO Company I often configure WordPress Permalinks (SEO / Friendly URL’s) under Apache on Fedora systems. I have compiled the following tutorial to enable friendly URL’s for WordPress on Fedora servers running the Apache web server.

To start off with you need to update your .htaccess file manually, by adding the following code to it:

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

You will probably notice that your Permalinks still 404 even after you have updated your .htaccess file, to fix this you need to enable Mod_Rewrite in Apache, well actually you are allowing your .htaccess file to override the httpd.conf file configuration.

Enable Fedora mod rewrite

To enable mod_rewrite open the following file as root:

/etc/httpd/conf/httpd.conf 

Change 

AllowOverride None

to 

AllowOverride All

Restart Apache on Fedora:

/etc/init.d/httpd restart

You will now be able to access your pages using the friendly human readable URL’s, additional CMS configuration may be required for other we apps but that is beyond the scope of this document.

Document Actions