Forum Moderators: phranque

Message Too Old, No Replies

Problem with .htaccess

I need to configure htaccess to be able to work with two subfolders too

         

surferride

10:58 am on Aug 17, 2012 (gmt 0)

10+ Year Member



I have a website domain.ch, where I configured www.domain.ch/forum/ and www.domain.ch/blog/.

The forum folder has a PHPBB installation and the Blog a Wordpress installation.

I want every user to be able to enter: domain.ch without WWW or domain.ch/forum or /blog without the WWW and that still works.

I dont have a problem on re-adding the WWW. on the URL bar everytime someone doesnt types it. I just want to make sure that everybody will access my websites resources by typing www or without www.

Thanks in advance for your help

lucy24

11:13 am on Aug 17, 2012 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Unless there's something really screwy about either your DNS or your hosting plan, it should make no difference whether your visitors type "www." or not. In fact people usually have the opposite question: how to redirect users to one form or the other.

Is your site "live" yet? If so, what happens when you request an URL without leading www?

g1smd

1:04 pm on Aug 17, 2012 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Make sure you add a non-www to www redirect. You don't want to directly serve content at both versions. One should redirect.

phranque

12:54 am on Aug 18, 2012 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



welcome to WebmasterWorld, surferride!

you should do an nslookup for both hostnames and make sure they both resolve to a server under your configuration control.

then make sure the server(s) has both hostnames configured or a wildcard configuration.