Results 1 to 2 of 2
  1. #1
    eaton2003's Avatar
    eaton2003 is offline Public Member
    Join Date
    September 2003
    Posts
    1,164
    Blog Entries
    8
    Thanks
    87
    Thanked 237 Times in 189 Posts

    Default htaccess question

    Have a quick question and looking for a quick fix.

    I have an old site which has several sub domains and I will like to redirect all pages/sub domains and folders to a new site so as this;

    http://www.samplsite.com/dir/abc to go to http://www.newsite.com and not http://www.newsite.com/dir/abc which it is currently doing.

    Look forward to the help.
    Simon Eaton - Online marketing consultancy with 20 years experience

  2. #2
    eaton2003's Avatar
    eaton2003 is offline Public Member
    Join Date
    September 2003
    Posts
    1,164
    Blog Entries
    8
    Thanks
    87
    Thanked 237 Times in 189 Posts

    Default

    Found a fix and used this

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^sub.mydomain.com
    RewriteRule (.*) http://www.mynewdomain.com [R=301,L]
    Simon Eaton - Online marketing consultancy with 20 years experience

  3. The Following 2 Users Say Thank You to eaton2003 For This Useful Post:

    Cash Bonus (19 July 2018), luckyga (20 July 2018)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •