addon domain

Using a single web hosting account to host multiple sites

addon domain

Postby onurz » Wed Aug 23, 2006 3:56 pm

Hello,

i've 2 domains
domain1.com
domain2.com

domain2.com is a an addon domain on domain1.com

when i directly visit domain2.com mod rewrite doesn't work.
but when i visit domain1.com/domain2 (domain2 is folder of the domain2.com files) mod rewrite works fine.

below is my htaccess file..
if a file ends with -movies.html it runs movies.php
but as i said doesn't work on domain2.com but works at domain1.com/domain2

what should i do to let it work directly in addon domain2.com
thanks in advance


RewriteEngine on
RewriteRule ^(.*)\-movies.html$ movies.php?var=$1
onurz
 
Posts: 3
Joined: Wed Aug 23, 2006 3:48 pm

Postby richardk » Thu Aug 24, 2006 3:19 am

Do both domains have the same document root? What are is the document root (or document roots)? Where is movies.php located? Where is the .htaccess file located? Is it supposed to work for both domain1.com and domain2.com or just domain2?
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby onurz » Thu Aug 24, 2006 5:57 am

yes they have the same root.

movies.php located in rootdir/domain2/
domain1 has another .htaccess and located in rootdir
.htaccess for domain2 is located at rootdir/domain2/

it is supposed to work for domain2 .

thanks
onur
onurz
 
Posts: 3
Joined: Wed Aug 23, 2006 3:48 pm

Postby richardk » Thu Aug 24, 2006 6:05 am

yes they have the same root.

Are you sure, is the index file of domain1 the same as domain2? Or is domain2's index file in domain2/?

What does the other .htaccess file contain? I need you to give me as much info about how you have this setup as possible.
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby onurz » Thu Aug 24, 2006 10:02 am

index of domain2 is in folder domain2/ under domain1 .
other .htaccess is same as this one.

but when visiting www.domain2.com .htaccess does not work
but it works when visiting as domain1.com/domain2
onurz
 
Posts: 3
Joined: Wed Aug 23, 2006 3:48 pm

Postby richardk » Thu Aug 24, 2006 11:25 am

Try using this for in both:
Code: Select all
Options +FollowSymLinks

RewriteEngine On

RewriteRule ^([^/]+)-movies\.html$ movies.php?var=$1 [L]
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am


Return to Domain Handling

Who is online

Users browsing this forum: No registered users and 92 guests

cron