Solved

Your opinion needed: Include virtual with IDIOTIC absolute path

Posted on 2004-09-28
7
214 Views
Last Modified: 2013-11-18
I am having an argument with the help desk of my Web hosting server.

The guy insists that I have to use a path like this:

include virtual="/btslmtrad2.datasecure.net_non_ssl/niveau-b/includes/connect_db.asp"

The stupid part being "/btslmtrad2.datasecure.net_non_ssl/niveau-b"

I am in the process of switching servers for a supposedly newer (read "better") server. On my old server, they created pointers (or root directories) for my five web sites. The way I included files was like this:

include virtual="/includes/connect_db.asp"

The "includes" folder being located in the root directory of each web site

This worked perfectly and had the advantage of also working on my local version of IIS where I sometimes modify my files.

Now with the new server, I have to use a HUGE path that I must add onto every include command in my sites.

I have about 12 000 pages in five web sites. I don't see how this can be the way things are done correctly.

There must be a way for my new server to specify that my root folders are indeed my ROOT folders for the include virtuals of each Web site.

Am I COMPLETELY out to lunch?

0
Comment
Question by:vanauden
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
7 Comments
 
LVL 33

Expert Comment

by:humeniuk
ID: 12172225
No, you're not out to lunch.  The "includes" directory should be in your site's root directory and you should be able to access it as you did previously.  Tell them to get their act together because you're not updating 12,000 pages.
0
 
LVL 15

Expert Comment

by:periwinkle
ID: 12172550
I agree with humeniuk.

Do you have SSH access to your server?  If so, you can create symbolic links in each of the five directories.

Or, a better solution, is to ask them to add a simple line to your httpd.conf configuration for each of the virtual servers, that looks like:

Alias /includes /full/path/to/includes
0
 
LVL 1

Author Comment

by:vanauden
ID: 12172808
Hi periwinkle

Can provide a fake, but concrete example for your "alias" code? I don't know much about server configuration.

thanks!
0
Free NetCrunch network monitor licenses!

Only on Experts-Exchange: Sign-up for a free-trial and we'll send you your permanent license!

Here is what you get: 30 Nodes | Unlimited Sensors | No Time Restrictions | Absolutely FREE!

Act now. This offer ends July 14, 2017.

 
LVL 15

Accepted Solution

by:
periwinkle earned 500 total points
ID: 12172922

Something like:

<VirtualHost xxx.xxx.xxx.xxx:80>
ServerName www.mydomain.com
ServerAlias mydomain.com
DocumentRoot /home/httpd/yourdomain
Alias /includes /home/httpd/yourotherdomain/includes

...

</virtualhost>

where xxx.xxx.xxx.xxx is your IP address.  Your configuration may vary, but the Alias line is what is important.  I don't know if you can stick it in an .htaccess file (I'd think that you can't), but it's something you could try.
0
 
LVL 1

Author Comment

by:vanauden
ID: 12172991
thank you periwinkle! and thank you humeniuk for the input as well!
0
 
LVL 33

Expert Comment

by:humeniuk
ID: 12173125
Good luck.  Sounds like you're on the right track.
0
 
LVL 15

Expert Comment

by:periwinkle
ID: 12173132
Glad to have helped!
0

Featured Post

Don't Miss ATEN at InfoComm 2017!

Visit booth #2167 to see the  new ATEN VM3200 32 x 32 Modular Matrix Switch. Other highlights include the VE8950 4K HDMI Over IP Extender, VS1912 12-Port DP Video Wall Media Player  and VK2100 ATEN Control System. Register now with Free Pass Code ATEN288!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Shoutout to Emily Plummer (http://www.experts-exchange.com/members/eplummer26.html) for giving me this article! She did most of it, I just finished it up and posted it for her :)    Introduction In a previous article (http://www.experts-exchang…
What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
The viewer will learn how to count occurrences of each item in an array.

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question