neeed help pleaseee!!!

Using a single web hosting account to host multiple sites

neeed help pleaseee!!!

Postby nikki_k » Mon Oct 09, 2006 5:38 pm

Hi,

So the issue is:

I have a hosting which i had 1 domain on it, let's call it www.domain1.com and recently added www.domain2.com.

Now I know I can add a certain code within the htaccess to be able to direct www.domain2.com to another folder/directory. Please be specific as I am a complete dummy when it comes to these things

Now from what I have gathered within this forum, I tried to use this...

Options +FollowSymLinks

RewriteEngine On

RewriteCond %{HTTP_HOST} ^(www\.)?domain2\.com$ [NC]
RewriteRule !^ACC(/.*)?$ /ACC%{REQUEST_URI} [QSA,L]

But it is giving me an error page. And ACC is the folder which i created within the folders for the new directory for domain2.

Thanks!
nikki_k
 
Posts: 4
Joined: Mon Oct 09, 2006 3:42 pm
Location: Canada

Postby softtoy » Tue Oct 10, 2006 6:52 am

Look at the lastest code at the thread "NOT PERFECT YET". It will do everything you need. 8)
softtoy
 
Posts: 26
Joined: Mon Jun 12, 2006 9:45 pm

Postby richardk » Tue Oct 10, 2006 9:08 am

What error are you getting? Are you sure you're able to use mod_rewrite?
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby nikki_k » Tue Oct 10, 2006 11:56 am

Well since i wrote this code within HTaccess, the second domain has not been working, while the first is still active. Seems to me that would mean I can play with the codes. My hosting has it's own little control panel, Not like Cpanel, and in ther ethey give you a direct place you can just go in and edit Htaccess.

When I upload files, there is a main folder I upload it for the main domain, which they call " htdocs" Now is that where I am suppose dto place the ACC folder or outside of that folder?
nikki_k
 
Posts: 4
Joined: Mon Oct 09, 2006 3:42 pm
Location: Canada

Postby richardk » Tue Oct 10, 2006 12:33 pm

You should have
Code: Select all
htdocs/
htdocs/.htaccess
htdocs/ACC/
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby nikki_k » Tue Oct 10, 2006 10:04 pm

hmm, when I go in my ftp, i see htdocs and as well as htaccess there. And then within htdocs I placed ACC, as you stated.

Basically on my control panel, in the editor, is there a code we need to put for this particular rule to apply?

Because I notice that for the hot linking protection, it starts and finished like this:

# Begin hotlink protection #
RewriteEngine on
[.......]
# End hotlink protection #


(then right after)

Options +FollowSymLinks

RewriteEngine On

RewriteCond %{HTTP_HOST} ^(www\.)?domain2\.com$ [NC]
RewriteRule !^ACC(/.*)?$ /ACC%{REQUEST_URI} [QSA,L]


Is there something wrong with all this??

Thanks
nikki_k
 
Posts: 4
Joined: Mon Oct 09, 2006 3:42 pm
Location: Canada

Postby richardk » Wed Oct 11, 2006 6:27 am

Don't use the control pannel, edit the file directly.

Now, post here, or PM to me the contents of your .htaccess file.
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby richardk » Thu Oct 12, 2006 9:18 am

Try:
Code: Select all
Options +FollowSymLinks

RewriteEngine On

RewriteCond %{HTTP_HOST} ^(www\.)?domain1\.biz$ [NC]
RewriteRule !^ACC(/.*)?$ /ACC%{REQUEST_URI} [QSA,L]

RewriteCond %{HTTP_REFERER} !^(http://(www\.)?(domain2\.net|domain3\.com)(/.*)?)?$ [NC]
RewriteRule \.(gif|jpg|png)$ http://www.hiphopvideomodels.net/ [R,L]


You may need to remove the $ from after ^(www\.)?domain1\.biz.
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby nikki_k » Fri Oct 13, 2006 12:59 pm

I tried both. Still doesn't work. :(

EDIT: nevermind, your code works fine, my htaccess file was not in the right place. silly me!!!

Thanks for your help Richardk!!!

Nikki
nikki_k
 
Posts: 4
Joined: Mon Oct 09, 2006 3:42 pm
Location: Canada


Return to Domain Handling

Who is online

Users browsing this forum: No registered users and 110 guests

cron