tags:

views:

27

answers:

1

i have this on my htaccess currently:

RewriteEngine on
RewriteCond %{REQUEST_URI} !^/www/
RewriteRule (.*) /www/$1/index.php

but i keep getting an error page

what im trying to do is to register a lot of domains for clients and just store all their websites' files on a folder named "theirdomain.com" on my domain's www folder.

A: 

Firstly you will never find www in the URI BEcause the URI is everything after index.php? so the uri will be index.php?/here/is/the.uri/string

I would look at HTTP_HOST

<IfModule mod_rewrite.c>
   RewriteCond %{HTTP_HOST} !^first-host.com$ [NC]
   RewriteRule ^(.*)$ http://new-host.com/$1 [L,R=301] #Send 301 so search engines know where to go.
</IfModule>
RobertPitt
RobertPitt
so for example the domain this htaccess is on www.mydomain.com .We have someone we register as someone.com and forward their dns to www.mydomain.com,now htaccess should point to the mydomain.com/www/someone.com/index.phpis that possible?
lock
I very much doubt this is possible via htaccess, you need to set up your DNS records on your server to point to a perticular user, so theredomain.com will point to /server/domains/theredomain.com/public_html/ im not the best at server and dns but i belive a method like this is what's needed
RobertPitt