ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Is there any advantage to dropping the www. from my URL?

February 22, 2008 1:12pm

Subscribe [11]
  • #31 / Aug 27, 2008 10:48pm

    ak4mc

    429 posts

    The forum won’t let me attach it. Here it is with the EE blacklist stuff removed:

    RewriteEngine on
    <IfModule mod_security.c>
          # Turn off mod_security filtering.  SMF is a big boy, it doesn’t need its hands held.
          SecFilterEngine Off

          # The below probably isn’t needed, but better safe than sorry.
          SecFilterScanPOST Off
    </IfModule>

    RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
    RewriteRule ^(.*)$ http://%1/$1 [R=301,L]

    RewriteCond %{HTTP_HOST} ^mcgeheezone.com$ [OR]
    RewriteCond %{HTTP_HOST} ^www.mcgeheezone.com$
    RewriteRule ^blogoSFERICS/?$ http://mcgeheezone.com/index.php/zone/index/ [R=301,L]
    RewriteRule index.php/zone/subject/play_rough_fight_dirty/ http://mcgeheezone.com/index.php/stuff/fiction/subject/play_rough_fight_dirty/ [R=301,L]
    RewriteRule index.php/zone/subject/the_stuttering_of_the_kids/ http://mcgeheezone.com/index.php/stuff/fiction/subject/the_stuttering_of_the_kids/ [R=301,L]
    RewriteRule index.php/weblog/comments/1505/ http://mcgeheezone.com/index.php/zone/comments/big_surprise_not/ [R=301,L]
    <Files 403.shtml>
    order allow,deny
    allow from all
    </Files>

  • #32 / Aug 28, 2008 10:04pm

    ak4mc

    429 posts

    Anyone…?

    Bueller…?

  • #33 / Aug 29, 2008 12:34am

    Derek Jones

    7561 posts

    Try a new .htaccess file in your root with nothing but the following:

    RewriteCond %{HTTP_HOST} ^www\.mcgeheezone\.com$
    RewriteRule (.*) <a href="http://mcgeheezone.com/$1">http://mcgeheezone.com/$1</a> [R=Permanent]

    And there aren’t any other .htaccess files in the subdirectories, right?

  • #34 / Aug 29, 2008 2:49am

    ak4mc

    429 posts

    And there aren’t any other .htaccess files in the subdirectories, right?

    There are .htaccess files in other directories, in particular the /ee/ sub—but now that I think of it there aren’t many rules and I may not need them. I’ll delete that file and see if that fixes it for that subdirectory.

    Update: Fixed it. That was the $64,000 question, Derek. Thanks.

  • #35 / Aug 29, 2008 9:43am

    Derek Jones

    7561 posts

    Cool, McGehee, I kept scratching my head as what you had posted sure did look right.

  • #36 / Aug 29, 2008 6:57pm

    ak4mc

    429 posts

    The effect of .htaccess files in subdirectories is a factor I hadn’t considered. It’ll be near the top of my troubleshooting list in the future.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases