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
https://forums.phpfreaks.com/topic/134722-pointer-domain-url-problem/
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/

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.