Solved

image hosted on another website

Posted on 2011-02-22
9
232 Views
Last Modified: 2012-05-11
want an image.jpg to be hosted on website.com
but I want to write <img src="website2.com/image.jpg">

and see that image
0
Comment
Question by:rgb192
  • 5
  • 4
9 Comments
 
LVL 6

Expert Comment

by:MatthewP
Comment Utility
Shouldn't be a problem, make sure you start the link http:// or https:// or the browser will interpret it as a local request, it needs to be <img src="http://www.website2.com/image.jpg"> (with or without the www as applicable to that site)
0
 

Author Comment

by:rgb192
Comment Utility
but image is on website.com

not website2.com

I want only website2.com to be visible
0
 
LVL 6

Expert Comment

by:MatthewP
Comment Utility
This sounds like a strange request, why do you want the html source to point to somewhere else? At the end of the day being html the url for the image has to result in the image being sent back one way or the other, either that or the image not being displayed.

Could you explain what you are trying to achieve at the end of the day?



0
 

Author Comment

by:rgb192
Comment Utility
i am moving website.com to another host and I dont want the website to go down and have no image

I would rather have a pointer image
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 6

Expert Comment

by:MatthewP
Comment Utility
Do you mean you are updating the nameservers and want to ensure that a holding page is displayed whilst the nameservers are being updated?
0
 

Author Comment

by:rgb192
Comment Utility
yes
0
 
LVL 6

Accepted Solution

by:
MatthewP earned 500 total points
Comment Utility
If that is the case, if you move website.com then it won't be able to display the html to tell it to get the image from website2.com if it goes down so that's still not the way to do it. Your best bet is to have your copy of the site on the new host set up and working ready and just do it. Nameserver transfers seem to happen a lot quicker than the 24/48 hours they used to take.

The way to stop this happening is to point your web site using the DNS records rather than the name servers at your host, so you point the A record, www record, MX records separately. This doesnt take time to update as theres no nameserver change if you update them, however if you've already got the nameservers pointed elsewhere theres not a lot you can do in that case.



0
 

Author Closing Comment

by:rgb192
Comment Utility
thanks
0
 
LVL 6

Expert Comment

by:MatthewP
Comment Utility
No problem.

If it is likely nameservers will change in the future be sure to understand DNS from what I said above, research it a bit too it can be complicated if you don't understand it, also you can get managed DNS from a provider like http://www.dnsmadeeasy.com/ - they will host your own nameservers (see Vanity DNS section) and from there you can point the DNS records to various places and still use your own nameservers if you really need that. Will stop down time in the future.

I've had to do the nameserver updates before and generally pick a time when usage is low - overnight maybe - and put a message up a day or 2 before hand saying that server maintenance is happening on the night of xx/xx/20xx, you may experience some temporary interruption in service etc." or something. If you run a mailing list let them know in advance too. Also, last time i did this it transferred in about 2 hours, does seem to be faster these days.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now