Forum Topic: Need to force www in the public html folder only
Hi, wasn’t sure where to post this.
If wrong spot, sorry.
I have no idea how to do this
Need to force www in the public html folder only
all other folders should not require it
Any help appreciated
5 Replies to “Need to force www in the public html folder only”
It should be do-able. Allow me to ask, by the
public_html folder, are you referring to the root directory of your site? For example, you want to force www for
http://example.com/ but not
yes that is correct, I want to force www for http://example.com/ but not http://example.com/any-other-directory/.
This is a great question and I’ve spent a couple of hours trying to match only the root URL, but no luck. One workaround would be to just require www for all URLs, which is explained on page 62 (section 5.1) in the book. I hope that helps!
can do that easily enough, however subdomains wont work with www (which from vague memory is to do with the server config in this instance)
(sorry whims is my usual online nick lol)
Ahh, www and subdomains ring a bell.. I did some work on this issue not too long ago: Canonical URLs and Subdomains with Plesk maybe that will help?