Jump to content

Subdomain index.php getting file from entire sites root folder w/o absolute path


visualazza

Recommended Posts

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.

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.

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.