Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Vhosts - paths problem

Status
Not open for further replies.

scathlock

Programmer
Feb 7, 2010
1
PL
Hello,
I have XAMPP 1.6.8. I tried to set up a vhost because I don't want to keep my projects in htdocs. The schema of httpd-vhosts.conf is below:

Code:
NameVirtualHost 127.0.0.1:80

<VirtualHost 127.0.0.1:80>
DocumentRoot C:\xampp\htdocs
ServerName localhost
ServerAlias localhost [URL unfurl="true"]www.localhost[/URL]
</VirtualHost>

<VirtualHost 127.0.0.1:80>
DocumentRoot D:\projects\prj1
ServerName prj1.localhost
ServerAlias prj1.localhost [URL unfurl="true"]www.prj1.localhost[/URL]
DirectoryIndex index.php
<Directory D:\projects\prj1>
    AllowOverride All
    Allow from All
</Directory>
</VirtualHost>

The problem is that browser can't find images and css because of paths - links are broken. They look like or When I delete the backslash links are OK.
Could You help me with this problem?
 
Always use forward slashes in your paths or try escaping them (with \\ instead of \).

Hope this helps,

Wullie

The pessimist complains about the wind. The optimist expects it to change. The leader adjusts the sails. - John Maxwell
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top