Reputation: 41
I have made a new website for a customer. Before we put it online he wants to see it.
Now, I have server, so I thought of putting it in a subdirectory: http://localhost/project2
I added this to the vhost:
Alias /project2 /home/sites/www/project2
<Directory /home/sites/www/project2>
Options Indexes FollowSymLinks
AllowOverride All
order allow,deny
allow from all
</Directory>
This is working fine, when I go to http://localhost/project2
the site is loaded. Only the css, javascript, ... are not loaded because they are still pointing to the main url
<script type="text/javascript" src="/js/jquery.lightbox.min.js"></script>
Loads http://localhost/js/jquery.lightbox.min.js
Also, when I post a form, my action is e.g. /contact, it refers to http://localhost/contact
Is there an easy way to solve this?
Upvotes: 1
Views: 253