Page 1 of 1

XAMPP - vhosts

Posted: Thu Jun 11, 2009 8:16 pm
by nkamp
Hello,

first I had the site installed in htdocs of XAMPP. Now I will use vhosts and certain problems were there:
- in the file include.php there were still path like D:\XAMPP\ instead of E:\htdocs (new location) I have changed that no problem
- my location for stylesheet for example was

Code: Select all


<link rel="stylesheet" type="text/css" media="print" href="http://localhost/mysite/stylesheet.php?cssid=30&mediatype=print" />

and is with vhosts:

Code: Select all


<link rel="stylesheet" type="text/css" media="print" href="http://mysite.dev/stylesheet.php?cssid=30&mediatype=print" />

What is the easiest way to manage/maintain this? Because if I put on my webserver back, then I need the first line(s) of localhost again!

Thanks in advance,

Nico

(Sorry, I have changed the code lines, but in the preview it looks good. When I the first time post it I didn't check the message. But now it's good)

Re: XAMPP - vhosts

Posted: Thu Jun 11, 2009 8:30 pm
by alby
nkamp wrote: What is the easiest way to manage/maintain this? Because if I put on my webserver back, then I need the first line(s) of localhost again!
Not hardcoded but use {stylesheet} tag in template.
Tag look in your config.php, when you move change your path/url with correct values and ... it's ok!

Alby

Re: XAMPP - vhosts

Posted: Fri Jun 12, 2009 2:06 pm
by nkamp
I use the smarty tag {stylesheet}. The only thing is that I believe at Settings Global --> Admin there is still filed in localhost. Maybe If I changed this in mysite.dev.... Then it works.

But I does nobody else have first installed the site on localhost and later moved it to another location as with vhosts?


Sorry, I was forgotten one line to change #$config['root_url'] = 'http://localhost/......
I had already changed the other path lines

Now it works fine.

Nico