Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7499295
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T19:46:48+00:00 2026-05-29T19:46:48+00:00

I have an .htaccess file using mod_rewrite to redirect URLs from the old website

  • 0

I have an .htaccess file using mod_rewrite to redirect URLs from the old website to the new webpage equivalents. The new site can be viewed at www.eastwood-whelpton.co.uk (which only works in HTML5 browsers right now).

So far, I have got this working by making lots of Redirect Permanent statements to translate each of the old pages to a place in the new site.

This has worked until I’ve needed to create a subdomain for the old website (which I need to keep). Before, it was just in the folder /old/, but Google still crawls it despite not being allowed from Robots.txt. To fix this, I’ve put it in the subdomain ‘old’.

Problem now is, accessing a page such as old.eastwood-whelpton.co.uk/about.htm will still try to redirect to old.eastwood-whelpton.co.uk/about/about.php – which is on the new site.

Here’s a snippet of my HTACCESS file. All I need is to redirect old ‘www’ pages, but not old pages in the ‘old’ subdomain.

RewriteEngine on
RewriteCond %{HTTP_HOST} ^eastwood-whelpton [NC]
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

DirectoryIndex index.php

Redirect permanent /index.htm /index.php
Redirect permanent /index.html /index.php

Redirect permanent /yachthire.htm /holidays/sailingholidays.php
Redirect permanent /yachts.htm /about/thefleet.php
Redirect permanent /handover.htm /training/handover.php
Redirect permanent /holiday.htm /holidays/familyholidays.php
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T19:46:49+00:00Added an answer on May 29, 2026 at 7:46 pm

    First of all, Redirect is a directive from mod_alias

    Do not mix them! Your Redirect directive will execute in-spite of Whatever RewriteRule you have.

    Do this instead:

    I have changed your Redirects to RewriteRule and tweaked them a bit. Have added,

    RewriteCond %{HTTP_HOST} ^old [NC]
    RewriteRule ^ – [L]

    This will not redirect any of your old site URLs.

    Here is the whole :

    RewriteEngine on
    RewriteBase /
    
    RewriteCond %{HTTP_HOST} ^old [NC]
    RewriteRule ^ - [L]
    
    RewriteCond %{HTTP_HOST} ^eastwood-whelpton [NC]
    RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
    
    DirectoryIndex index.php
    
    ReWriteRule index\.html? /index.php [L,R=301]
    ReWriteRule yachthire\.htm /holidays/sailingholidays.php [L,R=301]
    ReWriteRule yachts\.htm /about/thefleet.php [L,R=301]
    ReWriteRule (handover)\.htm /training/$1.php [L,R=301]
    ReWriteRule (holiday)\.htm /holidays/family$1s.php [L,R=301]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an htaccess file that uses mod_rewrite to redirect /controller to /index.php?controller=%controller% Like
I have a site where I am trying to change the urls using mod_rewrite
I have a php website and I'm using mod_rewrite to redirect all of the
I'm wanting to rewrite Word Press urls using mod_rewrite in my .htaccess file in
I have a .htaccess file and am using mod rewrite to redirect /tags to
I have a .htaccess file in the root of a website: /var/www/mywebsite/htdocs/.htacess and I
Say I have a htaccess file shared by dev.server and server.site.com. The first domain
I have an .htaccess file that authenticates users against LDAP using mod_auth_ldap . My
I'm using mod_rewrite in a ManagedFusion settings file (similar to .htaccess) and I want
I currently have the following htaccess <IfModule mod_rewrite.c> # redirect all calls to index.php

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.