httpd.conf and XAMPP

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

I am still pretty new to this environment and don't know much about
httpd.conf.  I understand that it is the place to configure the server
but don't know how to actually use it for what I'm trying to do.

I use XAMPP to develop locally.  There is an external test server here
but it can be a pain to mess with it as I can only use it via SSH
(something else I'm new to) and prefer to develop locally until I have
enough to bother with moving everything up.

In XAMPP, when I use an include, such as <?php include "menu.php";?>, I
have to change that include (which is in the root) to <?php include
"../menu/php";?>  This is not a big deal BUT the menu in that include
references images, which are also in the root.

The problem: if the menu include file is called from another directory
underneath the root directory the images are broken because that
reference images in the root, not in the same directory.  In ASP I
would just reference the images like this: <img src="/image.jpg">.
This way no matter where I was, in the root or 10 subdirectories deep,
"/image.jpg" would always be looked for in the root.  The way it is
working out with XAMPP is it looks for the image in the "htdocs"
directory, not the root of the site I am working on.  The only way I
can figure a way around this is to create 2 include files and I'm
trying to avoid that.

When I use the test server (external to this machine) I can apparently
use absolute directory references just fine but I want XAMPP to behave
the same way.

I'm only assuming but is httpd.conf the answer?  And if so how do I do


Site Timeline