Jump to content

relative paths in subdomain


rubing

Recommended Posts

I just set up my first ever subdomain.  And I notice that it does not allow for realative paths.  Is that right?

 

for example, if before i had a line of html like this:

 

<style type="text/css" src ="/css/stylesheet1" />

 

It now requires the full path

 

<style type="text/css" src="http://www.example.com/css/stylesheet1" />

Link to comment
https://forums.phpfreaks.com/topic/110995-relative-paths-in-subdomain/
Share on other sites

correct, if you want it to pull the CSS from the main domain, and not the subdomain. using a relative path will pull from the subdomain obviously.

 

you can also use a BASE tag to default all links back to you regular domain (but not sure why you would): http://www.w3schools.com/TAGS/tag_base.asp

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.