Redirect multiple Pages to One Page

In: .htaccess code

3 Sep 2009

I am a self admitted htaccess rookie sometimes, although I have a very good idea of how to do it now.

So from this I have generated different section of code that will work when you want to redirect multiple pages to just one page or domain.

Options +FollowSymLinks

RewriteEngine on
RewriteCond %{REQUEST_URI} !^/index \.php$

RewriteCond %{REQUEST_URI} !^(.*)\.html$

RewriteCond %{REQUEST_URI} !^(.*)\.css$

RewriteCond %{REQUEST_URI} !^(.*)\.jpg$

RewriteCond %{REQUEST_URI} !^(.*)\.gif$

RewriteRule ^(.*)$ http://www.my-football-blogs.co.uk/ [L,NC,R=301]

This has worked for me in the past on one of my websites and below is one I used on a wordpress blog to a football forum

Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://www.footballforum.org.uk/ [R=301,L]

If you do have any trouble with this please give me a should and I will look into why it is not working with your website.

Please Remember these go in the .htaccess files and are for a apache server.

Comment Form

About Dave Stopher

I am a Geordie SEO Programmer who is working for one of the biggest SEO Companies in the country called Just Search

Photostream