< Browse > Home / .htaccess code / Blog article: Redirect multiple Pages to One Page

| Mobile | RSS

Redirect multiple Pages to One Page

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.

Random Posts

Leave a Reply 239 views, 3 so far today |

Random Posts

Leave a Reply