httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lightbulb432 <veerukrish...@hotmail.com>
Subject [users@httpd] RE: What are URLs relative to?
Date Thu, 11 Jan 2007 08:39:47 GMT

Thanks for your response. That makes sense.

What might be the reason, then, behind the quotation from that webpage in my
original post? Why would you need to define all links absolutely rather than
relatively? If the URLs are always relative to the error page URL which is
always in the same location regardless of the requesting URL, then is there
really an advantage to relative vs absolute URLs for the reason they
mentioned? Or am I missing something in all this?

Thanks.



Boyle Owen wrote:
> 
>> -----Original Message-----
>> From: lightbulb432 [mailto:veerukrishnan@hotmail.com] 
>> Sent: Thursday, January 11, 2007 7:36 AM
>> To: users@httpd.apache.org
>> Subject: [users@httpd] What are URLs relative to?
>> 
>> 
>> What are relative URLs relative to? For example, if you 
>> define an error page
>> in .htaccess and you have relative URLs in the error page 
>> itself (although
>> I've heard it's better to have absolute URLs in there), are 
>> those relative
>> URLs resolved relative to:
>> 
>> a) the physical location of that error page
>> b) the location of the requested URL (e.g. site.com/friendlyURL)
>> c) the location of the rewritten URL (e.g.
>> site.com/subdir1/subdir2/page.abc?hello=true)
> 
> Answer:
> 
> d) the location (ie, URL) of the error page
> 
> eg, if the error page is at http://server/error/404.html and the link is
> to "../index.html" then the URL of the link will be
> http://server/index.html
> 
> Rgds,
> Owen Boyle
> Disclaimer: Any disclaimer attached to this message may be ignored. 
> 
>> 
>> I saw the following from
>> http://www.yourhtmlsource.com/sitemanagement/custom404error.ht
>> ml, which is
>> the reason behind this question:
>> 
>> "Since your 404 page might be served up from any subdirectory 
>> of your site,
>> make sure all links and image sources are defined absolutely. 
>> For instance,
>> use href="/index.html" instead of href="../../index.html""
>> 
>> Thanks.
>> -- 
>> View this message in context: 
>> http://www.nabble.com/What-are-URLs-relative-to--tf2957180.htm
> l#a8272516
>> Sent from the Apache HTTP Server - Users mailing list archive 
>> at Nabble.com.
>> 
>> 
>> ---------------------------------------------------------------------
>> The official User-To-User support forum of the Apache HTTP 
>> Server Project.
>> See <URL:http://httpd.apache.org/userslist.html> for more info.
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>
>  
>  
> This message is for the named person's use only. It may contain
> confidential, proprietary or legally privileged information. No
> confidentiality or privilege is waived or lost by any mistransmission. If
> you receive this message in error, please notify the sender urgently and
> then immediately delete the message and any copies of it from your system.
> Please also immediately destroy any hardcopies of the message. You must
> not, directly or indirectly, use, disclose, distribute, print, or copy any
> part of this message if you are not the intended recipient. The sender's
> company reserves the right to monitor all e-mail communications through
> their networks. Any views expressed in this message are those of the
> individual sender, except where the message states otherwise and the
> sender is authorised to state them to be the views of the sender's
> company.
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/What-are-URLs-relative-to--tf2957180.html#a8273605
Sent from the Apache HTTP Server - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message