Issue with and without WWW
Posted by: cyclops_xbd (---.croy.cable.virginmedia.com)
Date: March 27, 2010 06:52PM

hey guys,

i setup my virtual hosting for 2 sites.

now check this out >

[WWW.itrepairlab.com] > IT WORKS and goes to the correct site (this is virtual host)

[itrepairlab.com] > It calls for local host which is the other site as primary

now how can i fix this issue? sad smiley

thanks

Options: ReplyQuote
Re: Issue with and without WWW
Posted by: yfastud (Moderator)
Date: March 27, 2010 07:21PM

you need to setup access, dns, and vh; access for permission to connect to your wamp pc, dns to tie domain(s) to your wamp pc, and vh to host multiple domains/websites and even you have only 1 domain/ip, you should use vh to set it up; if dont have real domain, just skip dns guide

to setup access, follow this
[blog.jlbn.net]

to setup vh, follow this
[blog.jlbn.net]

to setup dns, follow this
[blog.jlbn.net]

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: Issue with and without WWW
Posted by: cyclops_xbd (---.croy.cable.virginmedia.com)
Date: March 27, 2010 08:19PM

actually i did a little mix up.

with WWW it goes to the wrong site but WITHOUT www it goes to the right site

--------------------------------------------------------------------

i did setup the Access, DNS and VH

my code is below for HOST file:

127.0.0.1 localhost (this has 1st site)
127.0.0.1 www.itrepairlab.com (this has 2nd site)
127.0.0.1 itrepairlab.com (this has 2nd site)

---- > aaaand this is my Vhost file config!


<VirtualHost *:80>
ServerAdmin localhost
DocumentRoot "C:\wamp\www"
ServerName soundshock.co.uk
ServerName soundshock.com
</VirtualHost>



<VirtualHost *:80>
ServerAdmin www.itrepairlab.com
DocumentRoot "C:\wamp\itrepairlabwww"
ServerName www.itrepairlab.com
ServerName itrepairlab.com

<Directory "C:\wamp\itrepairlabwww">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>

</VirtualHost>

-------------

any suggestion how can i resolve this issue. all i want is to access the site WITH and WITHOUT www

Options: ReplyQuote
Re: Issue with and without WWW
Posted by: c2dan (---.15-1.cable.virginmedia.com)
Date: March 27, 2010 10:20PM

You need to use ServerName and ServerAlias

ServerName itrepairlab.com 
ServerAlias www.itrepairlab.com 

Options: ReplyQuote
Re: Issue with and without WWW
Posted by: cyclops_xbd (---.croy.cable.virginmedia.com)
Date: March 27, 2010 10:26PM

c2dan YOU ARE THE BEST MAN BUDDY! ive been trying to get this working for last 5 hours and all i needed was one line of this code smiling smiley

i am still learning the critical adjustment and this was another of new thing i learned

thank you

thank you soooooo much smiling smiley

Regards
ASIF

Options: ReplyQuote
Re: Issue with and without WWW
Posted by: yfastud (Moderator)
Date: March 27, 2010 11:33PM

yep, that's what you need as already instructed in step 4 in my vh guide winking smiley

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides



Edited 1 time(s). Last edit at 03/27/2010 11:34PM by yfastud.

Options: ReplyQuote


Sorry, only registered users may post in this forum.