Pro.Luv Posted December 6, 2008 Share Posted December 6, 2008 Hi, How can I convert absolute link to relative, I need to get a relative link of links like: <a href="/page.php">Page</a> And <a href="page.php">Page</a> I really need help with this. Thanks Quote Link to comment Share on other sites More sharing options...
revraz Posted December 6, 2008 Share Posted December 6, 2008 Those are relative links. Quote Link to comment Share on other sites More sharing options...
Pro.Luv Posted December 6, 2008 Author Share Posted December 6, 2008 I revraz, I'm sorry about that I got it mixed up, I want to make those links absolute from relative. Thanks Quote Link to comment Share on other sites More sharing options...
gevans Posted December 6, 2008 Share Posted December 6, 2008 absolute as in css absolute? <a style="position: absolute;" href="page.php">Page</a> Forgive me if I missunderstood Quote Link to comment Share on other sites More sharing options...
Pro.Luv Posted December 6, 2008 Author Share Posted December 6, 2008 Hi gevans, no not that type of absolute... An absolute link defines a specific location of the Web file or document including: the protocol to use to get the document, the server to get it from, the directory it is located in, and the name of the document itself. Below is an example of an absolute link: <a href="http://www.domain.com/pagename.html"></a> With a relative link, the search engine spiders and browsers already know where the current document is located. Thus, if you link to another document in the same directory, you will not need to write out the full URL. Only the file name is necessary. Below is an example of a relative link: <a href="pagename.html"></a> Quote Link to comment Share on other sites More sharing options...
ryanyoungsma Posted December 6, 2008 Share Posted December 6, 2008 are you looking to set a base href? <base href="http://www.yourdomain.com/" /> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.