WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] New help with a 301 mod rewrite (2 posts)

  1. jefferisp7
    Member
    Posted 3 years ago #

    Hi folks, I got this note about the slowdowns on our server suggesting a mod rewrite:

    when logging into http://www.igotasti.com <http://www.igotasti.com/> then clicking a link, you are redirected to http://igotasti.com <http://igotasti.com/> and are logged out.. this happens because the login session and cookie is created for the host and domain http://www.igotasti.com <http://www.igotasti.com/> but the next request is for http://igotasti.com <http://igotasti.com/>
    i think this can be fixed by ensuring all your internal site links point to http://www.igotasti.com <http://www.igotasti.com/> as opposed to just igotasti.com

    However, using a traditional rewrite on ipage.com, it started spewing errors and virus warnings :-)

    Maybe for WP I'm not putting it in the right way:
    `
    Options -Indexes
    Options +FollowSymLinks
    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTP_HOST} !^www\.igotasti\.com$ [NC]
    RewriteRule ^(.*)$ http://www.igotasti.com/$1 [R=301,L]

    # DENY PUBLIC ACCESS TO YOUR wp-config.php File
    <files wp-config.php>
    order allow,deny
    deny from all
    </files>
    # BEGIN WordPress

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule> `

    Any help greatly appreciated.

  2. jefferisp7
    Member
    Posted 3 years ago #

    Well, i found info in the wiki to use the config file:

    /** rewrite to www */
    define('WP_HOME','http://www.igotasti.com');
    define('WP_SITEURL','http://www.igotasti.com');

    I hope that is the best method

Topic Closed

This topic has been closed to new replies.

About this Topic