Solved

Your opinion needed: Include virtual with IDIOTIC absolute path

Posted on 2004-09-28
7
208 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
  • 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

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…
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

813 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now