Htaccess help anyone?

9860 pts.
Tags:
.htaccess
Apache
Redirect
RewriteRule
Web servers
I have a domain that has images pointing to a now nonexistent url. We will call it domain x. So it is http://domain.domainx.com/images/1.jpg I need to switch them to be http://www.domainy.com/images/1.jpg To switch all references of one to the other. Its like 5,000 of them. I found this: Options +FollowSymLinks RewriteEngine on # RewriteCond %{HTTP_HOST} ^(www.)?domainX.com RewriteRule ^merchant.mvc$ http://www.domainY.com/Merchant2/merchant.mvc [R=301,L] But do not know how to implement! Help!

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 3  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Gilly400
    Hi, Couldn't you just search and replace? Regards, Martin Gilbert.
    23,730 pointsBadges:
    report
  • Karl Gechlik
    5000 posts with several references in each? Ouch anyone else?
    9,860 pointsBadges:
    report
  • Pressler2904
    Not a real expert on DNS redirects, but I found this tidbit (oriented to the Apache webserver): http://forums.digitalpoint.com/showthread.php?s=25dac6f7e811fc6998228daa76b3527f&t=13 The post also talks about the "rewritecond" and "rewriterule" statements in the conf file, so I'm not sure how much help it will be....
    2,190 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following