Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Relative paths insufficient after opening secure page

Status
Not open for further replies.

Glasgow

IS-IT--Management
Jul 30, 2001
1,669
GB
I have set up a couple of web sites where all the links are specified as relative paths - e.g. 'contact.shtm', 'graphics/logo.gif' etc. However, when a secure page is called to capture sensitive data, I need to use a full path with 'https' prefix. The majority of these links are held in an 'include' file, drawn in at run-time as Server Side Include.

Of course thereafter, all my relative links are 'corrupted' as all will inherit an implies 'https' prefix.

What is the best way around this? If I use absolute paths (e.g. ' then I create a problem in my test environment where the host is different. I suppose, ideally, I would trap the situation when the user leaves the secure page but I'm not sure how I'd go about that.

Thanks in advance.
 
Thanks Chris. I did try that and got problems but I'll try again and report back.
 
some service providers, like yahoo, will take files that you have in your ssl folder and place them in an external location.

if this is the case, you'll need to use absolute references, ie:

Code:
<img src="[URL unfurl="true"]http://www.mysite/com/images/img1.gif"[/URL] />
instead of
Code:
<img src="/images/img1.gif" />

*cLFlaVA
----------------------------
[tt]I already made like infinity of those at scout camp...[/tt]
beware of active imagination: [URL unfurl="true"]http://www.coryarthus.com/[/url]

BillyRayPreachersSonIsTheLeetestHax0rDude
[banghead]
 
Chris - to confirm, changing to '/contact.shtm' gives a page not found error when in SSL though works fine without SSL.
cLFlaVA - Thanks. I'd like to avoid this if at all possible as it will make it very difficult to test on our local server.

To elaborate, if it helps at all, this is a shared server hosted by an ISP and a shared SSL certificate. Generating a secure path to pages is not just a case of changing 'http' to 'https' - I change from ' to '
I am not aware of any specific SSL folder. Will two copies of each file be held in separate folders even though I post to only one location in ftp?

Does this give you any ideas?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top