Clean URLs in Concrete5 Issues

Today I’m going to discuss something that I have searched for on the Concrete5 forums for but have never really found much information for: clean URLs. I’ve had customers come to me complaining that the main page of the site loads and none of the other pages do. They all lead to 404 pages. I know from experience that most php scripts that throw errors like that are having issues with the Clean URLs (permalinks in WordPress).
The easiest thing to do is to enable pretty URLs in the Concrete5 dashboard (dashboard->sitewide settings->enable pretty URLs). But what if you can’t get to the dashboard? A simple .htaccess rewrite will suffice. Add the following to the .htaccess in the directory you have Concrete5 loaded:

# -- concrete5 urls start --

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

# -- concrete5 urls end --

This will get the clean URLs working for you immediately.