Page 1 of 1

.htaccess code

Posted: Wed Jul 06, 2011 12:02 pm
by ChrisBull
Hi, I am trying to get all of the urls to go to the home page, index.php so i am using a .htaccess file. I don't really ubderstand any of the turorials that i have found though and so can't get it to work.

This is what i have so far.

Code: Select all

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^bandsite/ [NC]
RewriteRule ^(.*)$ http://bandsite/$1 [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
The idea is that it will force the 'http' bit to every url for consistency and all the urls got to index.php
I wrote it a long time ago, and now i don't know what it does.
Could someone please explain the code to me.

Thank you for you time
Chris