PDA

View Full Version : Sub domain


maurizio
10-23-02, 02:00 AM
Hi all,
i'm not sure but i think that sub domain related to virtual domains are not working.

Better i explain:

my site is www.maglio.net
i asked for another domain www.talkworld.net that pointing to www.maglio.net

i set a subdomain download.talkworld.net configuring properly the .htaccess but seem dont work

RewriteEngine On
Options +FollowSymlinks
RewriteBase /
RewriteCond %{HTTP_HOST} talkworld.net
RewriteCond %{REQUEST_URI} !talkworld/
RewriteRule ^(.*)$ talkworld/$1 [L]
RewriteCond %{HTTP_HOST} download.talkworld.net
RewriteCond %{REQUEST_URI} !download/
RewriteRule ^(.*)$ download/$1 [L]


Any help or confirm what i suppose?

thanx

maurizio

alphadesk
10-23-02, 02:20 AM
maurizio,

Not sure if you can do that with a pointed domain name since talkworld.net is actually pointed to maglio.net and you don't actually have subdomains for talkworld.net. Maybe one of the redirect gurus can come up with an answer or at least tell you if it is possible.

antizero
10-23-02, 02:55 AM
I don't think you can do it with one .htaccess file. You have the one to direct talkworld.net into it's own directory (folder called 'talkworld'). Then, I think you need another .htaccess file in THAT directory for the subdomain download.talkworld.net.

I might be wrong, but that seems logical to me. Once you place the first .htaccess file in your htdocs, you make the directory 'talkworld' the root directory for the domain talkworld.net, so any requests for that domain will go straight into the 'talkworld' directory.

Anyone else have a better idea?

maurizio
10-23-02, 05:01 AM
Hi Johnny and Keith,
thanx for suffestions, mybe some .htaccess gurus as Keith told will solve defitely the problem.

Ciao

Maurizio

antizero
10-23-02, 05:25 AM
I just tried it with my own account. I have a parked domain as well. The .htaccess file in the htdocs directory redirects the parked domain to it's own folder. Then the .htaccess file in that folder sets up the subdomain of the virtual domain. It works.

Your .htaccess file in the account's htdocs directory should look like this:

RewriteEngine On
Options +FollowSymlinks
RewriteBase /
RewriteCond %{HTTP_HOST} talkworld.net
RewriteCond %{REQUEST_URI} !talkworld/
RewriteRule ^(.*)$ talkworld/$1 [L]


And the .htaccess file in the folder named "talkworld" should look like this:

RewriteEngine On
Options +FollowSymlinks
RewriteBase /
RewriteCond %{HTTP_HOST} download.talkworld.net
RewriteCond %{REQUEST_URI} !download/
RewriteRule ^(.*)$ download/$1 [L]

Be sure your "download" folder is inside the "talkworld" folder.

Should work...works for me.

maurizio
10-23-02, 05:29 AM
I will try now John and i'll be back with results :)

ciao

maurizio

maurizio
10-23-02, 05:43 AM
Seem that point to the same domain www.talkworld.net

http://download.talkworld.net

try it

maurizio

antizero
10-23-02, 06:01 AM
Works on this end... www.talkworld.net points to your phpBB Forum, and download.talkworld.net points to a page that says: Welcome to Talkworld.net download page.

I assume that's what you expected it to do...

:)

maurizio
10-23-02, 06:06 AM
What? I dont see anything you told .. hehe
when i send http://download.talkworld.net is forwarded to www.talkworld.net PHPBB and not in the directory you told! hmmm
strange

maurizio

antizero
10-23-02, 06:12 AM
http://www.fi2k.com/ss.gif

Works for me...maybe someone else is going to have to have a look.

maurizio
10-23-02, 06:22 AM
I believe you! Is only strrange that for me is not working. bah.

Thanx i'll try again

maurizio

maurizio
10-23-02, 06:52 AM
Hi John,
is strange ... if i declare http://download.talkworld.net/index.html i see the page correcty. If not, seem that index is not loaded automaticaly.

ciao

maurizio

antizero
10-23-02, 07:05 AM
If index.html is going to be your start page, you could just make your .htaccess look like this:

RewriteEngine On
Options +FollowSymlinks
RewriteBase /
RewriteCond %{HTTP_HOST} download.talkworld.net
RewriteCond %{REQUEST_URI} !download/index.html
RewriteRule ^(.*)$ download/index.html$1 [L]


It's redundant, as index.html is the default start page. However, if it's not working for you then there's always that chance it won't work for other people. See if this solves your problem. :)

maurizio
10-23-02, 07:24 AM
Hi John, the way you have suggested not works.
If i was typing ...download.talkworld.net/index.html
return me a "page not found".
and when i was typing ...download.talkworld.net the same result as before .... return to PHPBB talkworld without pics.

grrr.... :-)

maurizio

antizero
10-23-02, 07:34 AM
oops...double post

antizero
10-23-02, 07:36 AM
Woops...I guess that directs all requests for download.talkworld.net to the index.html. I tried it on my own, and it tried to send it to index.htmlindex.html :(

Your site still works for me though.

I really don't know where to go from here. Hopefully someone else will have some more insight!

Good luck! :)

maurizio
10-23-02, 08:07 AM
Thanx alot John for you time. :D
Anyway if someone can solve this problem is welcome!

Thanx

maurizio