Hi,

I'm using 4.7 RC3.

The update was fine, I am using the new settings.php file and new .htaccess file. The one thing I changed was using this:

# Set some options.
Options -Indexes
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example.(.*)
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]

instead of this:

  # RewriteCond %{HTTP_HOST} !^www\.example\.com$ [NC]
  # RewriteRule .* http://www.example.com/ [L,R=301]

for some reason when I go to http://example.com/node/1, it brings me to http://www.example.com instead of http://www.example.com/node/1

I didn't have this problem before.

Can someone point me in the right direction? Thanks.

Comments

mgigirey’s picture

RewriteCond %{HTTP_HOST} !^www.example.com(:80)?$
RewriteRule ^/(.*) http://www.example.com/$1 [L,R=301]

www.serbuntu.net

mgigirey’s picture

RewriteCond %{SERVER_PORT} ^80$
RewriteRule ^(.*)$ http://www.example.com$1 [L,R]

this works for me ;-)

www.serbuntu.net

Mok’s picture

strange, doesn't work for me.

kozuch82’s picture

Dont you know if there is a way with .htaccess or some apache mods to kind of simulate the add-on domains on a single domain shared host? I mean redirecting to a folder according to the domain the user would call???

----
StandyGames.com - Quality, cross-platform free game downloads!