visualazza Posted August 15, 2010 Share Posted August 15, 2010 I was wondering of it was possible to have a file say style.css in the root folder of a site like www.example.com/style.css and then get a subdomain called www.sub.example.com which points to www.example.com/subarea to get that file without the use of absolute paths? Sorry if its not clear. Link to comment https://forums.phpfreaks.com/topic/210787-subdomain-indexphp-getting-file-from-entire-sites-root-folder-wo-absolute-path/ Share on other sites More sharing options...
wildteen88 Posted August 15, 2010 Share Posted August 15, 2010 The file style.css will be requested by your HTML (or specifically your web browser), not PHP. So you'd use a url <link rel="stylesheet" type="text/css" href="http://example.com/style.css" /> No matter what the url is it will request for correct file each time. Link to comment https://forums.phpfreaks.com/topic/210787-subdomain-indexphp-getting-file-from-entire-sites-root-folder-wo-absolute-path/#findComment-1099569 Share on other sites More sharing options...
visualazza Posted August 15, 2010 Author Share Posted August 15, 2010 yeah, i thought i would have to use an absolute path. Thanks anyway Link to comment https://forums.phpfreaks.com/topic/210787-subdomain-indexphp-getting-file-from-entire-sites-root-folder-wo-absolute-path/#findComment-1099579 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.