Jump to content

[SOLVED] WAMPP configuration


midi_mick

Recommended Posts

This is my 1st attempt at apache. I have just downloaded and installed WAMPP, and am having problems with relative paths in my documents. I use a commercial host for my published pages, but thought a local apache would help me with development and debug. I have set up a sub-directory under my DirectoryRoot for each website I am maintaining. However, relative links within the pages are not working correctly. Two examples (each a bit different, but showing the same symptoms):

 

1. I have a css file in folder site/css. The main page inli references "css/site.css". This is fine. However, in the css file is a url(../images/back.jpg) definition. Apache tries to find this file in "DocumentRoot/images" rather than in "DocumentRoot/site/images", where it actually resides.

 

2. Using Prototye for Ajax access gives me a similar problem. When I attempt to access data from the relative directory "scripts/program.php", it tries to find "DocumentRoot/scripts/program.php", instead of "DocumentRoot/site/scripts/program.php"

 

I have also tried all this setting by up an Alias for "site", but the results are the same.

 

Any ideas what I am missing in the config?

 

Thanks for any help.

 

Mick

 

 

 

[attachment deleted by admin]

Link to comment
Share on other sites

Copy/Move your test dir, so that it will be under:

DocumentRoot "C:/Program Files/xampp/htdocs"

 

Then try and see.

 

Using an alias is not the "proper" method of enabling a website.

 

Vhosts are specifically for that.

 

Also - there are a LOT of includes in your httpd.conf, such as:

 

# XAMPP specific settings

Include conf/extra/httpd-xampp.conf

 

G'Luck,

-steve

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.