dw87 wrote:I have tried configuring VirtualHosts, and using .htaccess rules, but nothing works.
Nobbie wrote:dw87 wrote:I have tried configuring VirtualHosts, and using .htaccess rules, but nothing works.
As you dont show what you did, we can say ... nothing!
Anyway, VirtualHosts should work, if correctly configured. Simply point the DocumentRoot of your VirtualHost to the full path of your project. And then dont call it via http://virtualhost/subfolder, but instead via http://virtualhost ("subfolder" is alread part of the DocumentRoot).
dw87 wrote:I can see that root relative paths are fine for live servers, but for development environments, shouldn't there be a way to work with them under /localhost but keeping different websites in their own subfolders?
C:/xampp/htdocs/ <-- Documentroot of localhost
C:/xampp/htdocs/styles.css <-- path /styles.css
C:/xampp/example.com/htdocs/ <-- DocumentRoot of example.com
C:/xampp/example.com/htdocs/styles.css <-- path /styles.css
C:/xampp/test.dev/public_html/ <-- DocumehtRoot of test.dev
C:/xampp/test.dev/public_html/styles.css <-- path /styles.css
Users browsing this forum: No registered users and 19 guests