ApolloX Posted January 2, 2008 Share Posted January 2, 2008 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. Quote Link to comment https://forums.phpfreaks.com/topic/84183-unexpected-rewrite/ Share on other sites More sharing options...
trq Posted January 2, 2008 Share Posted January 2, 2008 Maybe there is a rewrite rule defined within the httpd.conf file. Quote Link to comment https://forums.phpfreaks.com/topic/84183-unexpected-rewrite/#findComment-428749 Share on other sites More sharing options...
madmax Posted January 8, 2008 Share Posted January 8, 2008 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) Quote Link to comment https://forums.phpfreaks.com/topic/84183-unexpected-rewrite/#findComment-433977 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.