logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Match OldDomain.com/unique.html to NewDomain.com/unique.html
Author
tekisfun



Joined: 19 Sep 2014
Posts: 2

PostPosted: Fri 19 Sep '14 23:57    Post subject: Match OldDomain.com/unique.html to NewDomain.com/unique.html Reply with quote

Afternoon all,

I have moved my website from one domain to another.

The links from other people's sites to my old domain's content go to a blank page or get redirected to the new domain's homepage only.

Is RedirectMatch the right tool for having the example below work:

www.OldDomain.com/unique.html

to get perfectly redirected to

www.NewDomain.com/unique.html



Thanks for ideas!
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Wed 24 Sep '14 1:28    Post subject: Reply with quote

If you have just that one url,yes. Else a rewrite rule makes more sense
Back to top
tekisfun



Joined: 19 Sep 2014
Posts: 2

PostPosted: Wed 24 Sep '14 2:08    Post subject: Reply with quote

@james blond

Thanks for the feedback. I'll research rewrite rules now unless you can point me in a specific direction Smile
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Wed 24 Sep '14 21:46    Post subject: Reply with quote

Quick example written on my phone so excuse typos

Code:

RewriteEngine On
 RewriteBase /
 RewriteCond %{HTTP_HOST} !newdomain.com$ [NC]
 RewriteRule ^(.*)$ http://www.newdomain.com/$1 [L,R=301]
Back to top


Reply to topic   Topic: Match OldDomain.com/unique.html to NewDomain.com/unique.html View previous topic :: View next topic
Post new topic   Forum Index -> Apache