Jump to content

Pointer Domain URL problem


pepsi599ml

Recommended Posts

I'v been hosting multiple sites on one account with 3 different providers thru years, and I'v been always experiencing this problem since the very beginning - Pointer Domains. Here is the code from .htaccess.

 

RewriteCond %{HTTP_HOST} domain1.com

RewriteCond %{REQUEST_URI} !domain1.com/

RewriteRule ^(.*)$ domain1_com/$1 [L]

 

And the problem is when I go to a sub-directory (http ://domain1.com/dir) without a / (slash) at the end of the URL, the URL will be automatically changed to http ://domain1.com/domain1_com/dir.

 

So how could I get rid of the domain1_com from the URL? I'v searched all over the internet and couldn't found a way to solve it. Please help. Thanks.

 

Link to comment
Share on other sites

You're telling it to add the domain1_com lol

RewriteRule ^(.*)$ domain1_com/$1 [L]

 

You have a couple of things wrong with your rewrite stuff, by the way.

 

The CondPattern is supposed to be a "perl compatible regular expression."

 

(http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewritecond)

 

 

You can throw a = in there though.

 

RewriteCond %{HTTP_HOST} =domain1.com

RewriteCond %{REQUEST_URI} domain1\.com/

Link to comment
Share on other sites

You're telling it to add the domain1_com lol

 

I'm not good at this htaccess thing, but domain1_com is actually the root directory of that domain.

 

RewriteRule ^(.*)$ domain1_com/$1 [L] <--- all requests to this domain go into that directory

... ...

RewriteRule ^(.*)$ domain2_net/$1 [L] <--- all requests to this domain go into that directory

... ...

RewriteRule ^(.*)$ domain3_org/$1 [L] <--- all requests to this domain go into that directory

 

I don't what's wrong with my rewrite stuff, but that piece of code has always been working...except for the annoying url problem.

 

And, I was just told that this is called 'trailing slash' problem, but he didn't suggest a solution.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.