Cross-domain SSI on same server

Okay, here’s my dilemma. Will server facet includes work among 2 domains making use of their own FTP accounts hosted for the same server

One example is, let’s just say I squeeze below code on a page in http: //www. mysite. com:

HTML:
<! --#include virtual=" http: //www. space. com/shared/menu. txt" --> 

But equally mysite. com plus domain. com are about the SAME server, so would this SSI work in cases like this I ask because I know you can’t carry out cross-server SSI, but can one does cross-domain SSI given that they’re hosted within the SAME server

Thanks ahead!

The easiest method to know it is usually by testing it

It might work better considering the full path and FILE as opposed to VIRTUAL:

Code:
<! --#include file=" D: \somewhere\on\your\hard\drive\include. html" -->

Even so the files will be stored for the server, not my hard disk… I am baffled. Yeah I would test it, but the simply problem is, many of us haven’t bought this server. I just didn’t prefer to design 100 pages and have research ALL of them if the SSI doesn’t job. Sigh.

Do this..

Code:
 <! --#include file=" /ssi/file. txt" --> 

That implies the ‘ssi’ directory while in the root of ones web server.. so in case your secondary ‘domain’ tips to /web1/ or anything else… the forward slash from the beginning means the route starts at ones root.

Make sense

michiepoo: you may often get the exact path of your own server and replace that part I devote with it (I solely put it directly into show a taste path), depending against your programming skill.

One example is, ASP has two ServerVariables that could be retrieved to gather the road your website is situated on. The following signal sample should give you a minumum of one of them (usually both):

Code:
Resolution. Write Request. ServerVariables (" PATH_INFO" ) & " < BR> "
Resolution. Write Request. ServerVariables (" PATH_TRANSLATED" )

The former provide you with the virtual journey, and the recent (far more useful IMHO) gives you the actual real path. This is definitely what you’d substitute the C: \somewhere\on\your\hard\drive component with.

If ASP isn’t installed in your server, most other online programming languages to help my knowledge are designed for extracting this info for yourself.

This entry was posted in Web Design and tagged , , , , , , , , , , , , , , , , , , , . Bookmark the permalink.

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *