![]() |
| ||
| Force WWW except for Subdomains Issue I've been looking over the same .htaccess codes that will not work for a subdomain. It seems not many people really know how to do a correct .htaccess (including me I suppose). I've tried: RewriteCond %{HTTP_HOST} !^site\.net$ [NC]And it requires the WWW on the subdomain, such as bob.site.net, which I do not want. Does anyone have a solution to my problem? |
| ||
| Re: Force WWW except for Subdomains Issue So, basically starting off reading your rule, it says: If someone accesses this site that is *NOT* from http://site.net Then redirect them to http://site.net/string Maybe removing the 'NOT' is what your looking for: RewriteCond %{HTTP_HOST} ^site\.net$ [NC]Which would state, if someone is accessing your site from site.net redirect to www.site.net/string This rule would activate for anyone hitting http://site.net but not http://bob.site.net Is this the goal? |
| ||
| Re: Force WWW except for Subdomains Issue Yes, that worked. Thanks mate! Its so difficult finding any good information about htaccess. It seems no one really knows it well enough. |
| All times are GMT -4. The time now is 4:09 pm. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC