View Full Version : include virtual path

12-07-2006, 10:49 AM

I have small problem.
As my host doesnt allow parent path i need to change all paths to the virutal path.
<!--#include virtual="/test/myfile.asp" -->

However as my folder on web will not be named test I dont want to change 30 or more files to a different name.

So I was thinking if it's possible to write instead of "test"
Dim strmypath
strmypath = "/myfolder/"
<!--#include virtual="/<%=strmypath%>/myfile.asp" -->

I tried that but it's not working! Is it possible to do it???


12-07-2006, 02:52 PM
I had a similar problem sometime ago whilst developing a website in PHP. I solved the problem by creating a symbolic link.

But since you are using windows...not sure if you can create symbolic links at all.

Have you tried using the following.

Request.ServerVariables (PATH_TRANSLATED)

The above statement should take a given path and performs any necessary virtual-to-physical mapping to a given path.

Good luck.

12-07-2006, 04:04 PM

thanks for answer.

Not sure if i know how to do it right. Some tip??


12-18-2006, 03:21 PM
You cannot use variables in the SSI include.

You could try using Server.Execute instead, otherwise you will have to edit the links.
Use a search & replace tool.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum