Solved

Your opinion needed: Include virtual with IDIOTIC absolute path

Posted on 2004-09-28
7
202 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
Comment Utility
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
Comment Utility
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
Comment Utility
Hi periwinkle

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

thanks!
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 15

Accepted Solution

by:
periwinkle earned 500 total points
Comment Utility

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
Comment Utility
thank you periwinkle! and thank you humeniuk for the input as well!
0
 
LVL 33

Expert Comment

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

Expert Comment

by:periwinkle
Comment Utility
Glad to have helped!
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

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.
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

772 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

12 Experts available now in Live!

Get 1:1 Help Now