Jump to content

Unexpected Rewrite


ApolloX

Recommended Posts

Hi All,

 

Something is configured with my Apache (not sure how) such that links to directories are losing the "www." automatically.

 

For example:

 

  http://www.example.com/Board/index.html

  No rewrite

 

  http://www.example.com/Board/

  Rewrites to: http://example.com/Board/

 

Both are the same page, but if I use the default directory file syntax, the URL is rewritten with the "www." is dropped.  Anyone have any idea whats causing this?  There's not much in the .htaccess file, so nothing there is causing this behavior.

Link to comment
Share on other sites

Hmmm.... This could even be happening before your visitors get to the site. It may be a feature of DNS aliasing set up by your domain hosting account. e.g. if you have someone such as easily.co.uk, UK2 or similar company who specialises in doing nothing but hosting they generally offer DNS controls which allow you to alias www.yoursite.com as yoursite.com etc. This also applies to some of the free Dynamic DNS hosts as well.

 

4 areas to check - I'd suggest checking in this order...

 

1) DNS redirection as mentioned above - log in to your domain name control panel account and check any DNS alias options

2) .htaccess files with rules in them on your site - can happen if you install a 3rd-party PHP-driven site which configures your server to use them

3) A virtual host alias in your httpd.conf server configuration file

4) A rewrite rule in your httpd.conf server configuration file - you can spot these by a prefix "RewriteEngine ON" which enables rewriting (if you're not sure what you're looking for)

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.