Pages: 12Next
Current Page: 1 of 2
subdomains not working
Posted by: gypmaster (---.nrth.cable.ntl.com)
Date: March 01, 2008 07:29PM

Hi,

I've downloaded and installed wamp ... when I type in [localhost] I can see that the installation worked.

I've tried to set up two subdomains (plasmatv, canonlens)but whenever I type the url in the browser I get a dialog box opening (as though I'm trying to download something) which says

Opening

You have chosen to open


which is a: application/x-http-php
from [plasmatv.deals--now.com]

What should Firefox do with this file

then I get the choice of :

Open with
or
Save to disc

If I save to disc the I get a copy of my index.php file saved to my local disc in a file called mslzccw9

Anyone tell me why the index.php script isn't executin and tries to download?

I have a .htaccess file in the subfolder, here it is:

<Start htaccess>
ErrorDocument 404 /

AddHandler application/x-httpd-php5 .php .html .htm

DirectoryIndex index.php?pagename=Plasma-Tv ##<<<<Change For Use "-" for spaces<<<<<

RewriteEngine on
RewriteRule ^(.*)\.html index.php?pagename=$1 [NC,L]
<End htaccess>

Here is the virtual server stuff from the httpd-vhosts.conf

<VirtualHost *:80>
ServerName www.deals--now.com
ServerAlias deals--now
DocumentRoot C:/wamp/www/deals--now
ErrorLog C:/wamp/www/deals--now/logs/error.log
CustomLog C:/wamp/www/deals--now/logs/access.log common
</VirtualHost>

<VirtualHost *:80>
ServerName plasmatv.deals--now.com
ServerAlias plasmatv
DocumentRoot C:/wamp/www/plasmatv
ErrorLog C:/wamp/www/plasmatv/logs/error.log
CustomLog C:/wamp/www/plasmatv/logs/access.log common
</VirtualHost>

<VirtualHost *:80>
ServerName canonlens.deals--now.com
ServerAlias canonlens
DocumentRoot C:/wamp/www/canonlens
ErrorLog C:/wamp/www/canonlens/logs/error.log
CustomLog C:/wamp/www/canonlens/logs/access.log common
</VirtualHost>

<VirtualHost *:80>
ServerName localhost
DocumentRoot C:/wamp/www
ErrorLog C:/wamp/www/logs/error.log
CustomLog C:/wamp/www/logs/access.log common
</VirtualHost>

Here is the stuff from the hosts file:

127.0.0.1 localhost
127.0.0.1 deals--now.com
127.0.0.1 plasmatv.deals--now.com
127.0.0.1 canonlens.deals--now.com

anyone help??

Options: ReplyQuote
Re: subdomains not working
Posted by: hambuler (---.cpe.net.cable.rogers.com)
Date: March 01, 2008 07:47PM

Disable .htaccess file if you want to see where the problem is.

Options: ReplyQuote
Re: subdomains not working
Posted by: gypmaster (---.nrth.cable.ntl.com)
Date: March 01, 2008 08:02PM

I need the .htaccess file to exist BUT ...

... I followed your advice and deleted it just to see if it made any difference ...

it didn't

same problem keeps occurring.

any more thoughts

Options: ReplyQuote
Re: subdomains not working
Posted by: stevenmartin99 (---.b-ras1.blp.dublin.eircom.net)
Date: March 01, 2008 08:06PM

servername and alis written wrong


should be like

ServerName www.xxxxx.yyy
ServerAlias xxxxx.yyy *.xxxxx.yyy

Options: ReplyQuote
Re: subdomains not working
Posted by: gypmaster (---.nrth.cable.ntl.com)
Date: March 01, 2008 08:11PM

Hello steven,


thanks for the prompt reply ...

can you be a bit more specfic?

should it look like this?

<VirtualHost *:80>
ServerName www.deals--now.com
ServerAlias deals--now.com
DocumentRoot C:/wamp/www/deals--now
ErrorLog C:/wamp/www/deals--now/logs/error.log
CustomLog C:/wamp/www/deals--now/logs/access.log common
</VirtualHost>

<VirtualHost *:80>
ServerName plasmatv.deals--now.com
ServerAlias plasmatv.deals--now.com
DocumentRoot C:/wamp/www/plasmatv
ErrorLog C:/wamp/www/plasmatv/logs/error.log
CustomLog C:/wamp/www/plasmatv/logs/access.log common
</VirtualHost>

<VirtualHost *:80>
ServerName canonlens.deals--now.com
ServerAlias canonlens.deals--now.com
DocumentRoot C:/wamp/www/canonlens
ErrorLog C:/wamp/www/canonlens/logs/error.log
CustomLog C:/wamp/www/canonlens/logs/access.log common
</VirtualHost>

Options: ReplyQuote
Re: subdomains not working
Posted by: stevenmartin99 (---.b-ras1.blp.dublin.eircom.net)
Date: March 01, 2008 08:13PM

ServerName www.deals--now.com
ServerAlias deals--now.com *.deals--now.com


in this format

Options: ReplyQuote
Re: subdomains not working
Posted by: gypmaster (---.nrth.cable.ntl.com)
Date: March 01, 2008 08:16PM

Hi,

Sorry for being so dense - thanks for your patience ... I've tried the aedvice above but still same problem ..

here's what I've done ..

<VirtualHost *:80>
ServerName www.deals--now.com
ServerAlias deals--now.com *.deals--now.com
DocumentRoot C:/wamp/www/deals--now
ErrorLog C:/wamp/www/deals--now/logs/error.log
CustomLog C:/wamp/www/deals--now/logs/access.log common
</VirtualHost>

<VirtualHost *:80>
ServerName plasmatv.deals--now.com
ServerAlias plasmatv
DocumentRoot C:/wamp/www/plasmatv
ErrorLog C:/wamp/www/plasmatv/logs/error.log
CustomLog C:/wamp/www/plasmatv/logs/access.log common
</VirtualHost>

<VirtualHost *:80>
ServerName canonlens.deals--now.com
ServerAlias canonlens
DocumentRoot C:/wamp/www/canonlens
ErrorLog C:/wamp/www/canonlens/logs/error.log
CustomLog C:/wamp/www/canonlens/logs/access.log common
</VirtualHost>

Thanks again,
Mark.

Options: ReplyQuote
Re: subdomains not working
Posted by: stevenmartin99 (---.b-ras1.blp.dublin.eircom.net)
Date: March 01, 2008 08:19PM

you need to do this for all three.

Options: ReplyQuote
Re: subdomains not working
Posted by: gypmaster (---.nrth.cable.ntl.com)
Date: March 01, 2008 08:25PM

Hi Steven,

Looks like you're having a busy night smiling smiley

Can you tell me exactly what the following entry for the subdomain should be please?

<VirtualHost *:80>
ServerName plasmatv.deals--now.com
ServerAlias plasmatv
DocumentRoot C:/wamp/www/plasmatv
ErrorLog C:/wamp/www/plasmatv/logs/error.log
CustomLog C:/wamp/www/plasmatv/logs/access.log common
</VirtualHost>

Thanks in advance,
Mark.

Options: ReplyQuote
Re: subdomains not working
Posted by: stevenmartin99 (---.b-ras1.blp.dublin.eircom.net)
Date: March 01, 2008 08:28PM

<VirtualHost *:80>
ServerName www.plasmatv.deals--now.com
ServerAlias plasmatv.deals--now.com *.plasmatv.deals--now.com
DocumentRoot C:/wamp/www/plasmatv
ErrorLog C:/wamp/www/plasmatv/logs/error.log
CustomLog C:/wamp/www/plasmatv/logs/access.log common
</VirtualHost>








are u sure u can use --- in a url
??
maybe you can

but %2d is url encoding for - like & can be used

Options: ReplyQuote
Re: subdomains not working
Posted by: gypmaster (---.nrth.cable.ntl.com)
Date: March 01, 2008 08:35PM

I've never had a problem using -- in url

I made those changes but problem still the same in Firefox ... BUT

when I type in the url [plasmatv.deals--now.com] in IE I get the Index of listing for the deals--now folder

any other ideas?

TIA

Options: ReplyQuote
Re: subdomains not working
Posted by: stevenmartin99 (---.b-ras1.blp.dublin.eircom.net)
Date: March 01, 2008 08:38PM

do you have an index file in this folder or else thats wat u will get

Options: ReplyQuote
Re: subdomains not working
Posted by: gypmaster (---.nrth.cable.ntl.com)
Date: March 01, 2008 08:41PM

stevenmartin99 Wrote:
-------------------------------------------------------
> do you have an index file in this folder or else
> thats wat u will get


I don't have an index file in deals--now folder BUT I was hoping the typing

[plasmatv.deals--now.com]

would run the index.php script in my plasmatv folder ...

I do have an index.php file in plasmatv folder

Options: ReplyQuote
Re: subdomains not working
Posted by: stevenmartin99 (---.b-ras1.blp.dublin.eircom.net)
Date: March 01, 2008 08:43PM

how would that ever work? lol


u need an index.php in each folder

then wen u access the folder server automatically opens it



empty the history in firefox to see if that helps

Options: ReplyQuote
Re: subdomains not working
Posted by: gypmaster (---.nrth.cable.ntl.com)
Date: March 01, 2008 08:48PM

Hi steven,

cleared the history in FF and that also now shows me the Index Of listing for deals--now folder

it doesn't run the index.php script in plasmatv folder.

I don't need an index file in the deals--now folder but i've stuck a simple one in there ...

and tried again ...

now typing

[plasmatv.deals--now.com] in the address bar

runs the idex.php script in deals--now folder!!

Options: ReplyQuote
Re: subdomains not working
Posted by: stevenmartin99 (---.b-ras1.blp.dublin.eircom.net)
Date: March 01, 2008 08:49PM

im confused over the names of your folders!! lol

so is it working?

Options: ReplyQuote
Re: subdomains not working
Posted by: gypmaster (---.nrth.cable.ntl.com)
Date: March 01, 2008 08:55PM

Hi Steven,

not as confused as me lol!!

no, it's not working ...

I'll try to summarise what I want to achieve ... and I have this running now on a live webserver:

domain name www.deals--now.com

subdomain1 www.plasmatv.deals--now.com
subdomain2 www.canonlens.deals--now.com

to this end I have set up 3 folders in wamp\www

c:\wamp\www\deals--now
c:\wamp\www\canonlens
c:\wamp\www\plasmatv

then I tried setting up the 'virtual server' stuff to get the subdomains working ..

at the moment though it's still not working, whenever I type [plasmatv.delas--now.com] in the address bar, the index.php script that runs is the one in c:\wamp\www\deals--now

Cheers,
Mark

Options: ReplyQuote
Re: subdomains not working
Posted by: stevenmartin99 (---.b-ras1.blp.dublin.eircom.net)
Date: March 01, 2008 09:00PM

all these links aer working for me....... is this on ur server???


or on a different server up live on web

Options: ReplyQuote
Re: subdomains not working
Posted by: gypmaster (---.nrth.cable.ntl.com)
Date: March 01, 2008 09:03PM

the links that are working for you are not on my server, they are live on a real webserver hosted by a hosting company ...

I'm trying to use wamp to mirror that structure/setup on my own pc so that I can test safely.

Options: ReplyQuote
Re: subdomains not working
Posted by: stevenmartin99 (---.b-ras1.blp.dublin.eircom.net)
Date: March 01, 2008 09:13PM

Listen 80
NameVirtualHost *

<VirtualHost *>
ServerName www.deals--now.com
DocumentRoot C:/wamp/www/deals--now
</VirtualHost>

<VirtualHost *>
ServerName canonlens.deals--now.com
DocumentRoot C:/wamp/www/canonlens
</VirtualHost>

<VirtualHost *>
ServerName plasmatv.deals--now.com
DocumentRoot C:/wamp/www/plasmatv
</VirtualHost>

<VirtualHost *:80>
ServerName localhost
DocumentRoot C:/wamp/www
</VirtualHost>




ssave wat u have somewhere and just try this



Edited 1 time(s). Last edit at 03/01/2008 09:22PM by stevenmartin99.

Options: ReplyQuote
Pages: 12Next
Current Page: 1 of 2


Sorry, only registered users may post in this forum.