WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] WWW. .htaccess redirect caused blog to break (4 posts)

  1. christychristine
    Member
    Posted 3 years ago #

    I recently set up a .htaccess redirect to do two things:

    1) redirect traffic from christychristine.com to http://www.christychristine.com

    2) redirect /index.php and /default.php to http://www.christychristine.com/

    This has taken my blog down and I don't really know Apache well enough to get the blog to be viewable again. I can access the backend of the blog at /blog/wp-login.php but can't get anything to show at http://www.christychristine.com/blog/

    I can't redirect the blog to my homepage because it is being used. Any help would be GREATLY appreciated!

  2. Alok Tiwari
    Member
    Posted 3 years ago #

    Check wp.config.php
    What's the entries for WP_HOME // blog url and WP_SITEURL // site url

    Also Make sure your .htaccess file is redirecting to said entries only.
    Take Backup before doing any changes. with above files.

  3. christychristine
    Member
    Posted 3 years ago #

    #mralokkp: I was unable to find either entry you were asking about in the wp.config.php file. I haven't touched it since I put wordpress onto my site via GoDaddy. The closest item I could find was this:

    /** Absolute path to the WordPress directory. */

    if ( !defined('ABSPATH') )

    define('ABSPATH', dirname(__FILE__) . '/');

    /** Sets up WordPress vars and included files. */

    require_once(ABSPATH . 'wp-settings.php');

    Here is what my .htaccss looks like. I haven't set any rules for redirecting the blog.

    RewriteEngine on
    rewritecond %{http_host} ^christychristine.com [nc]
    rewriterule ^(.*)$ http://www.christychristine.com/$1 [r=301,nc]
    RewriteCond %{THE_REQUEST} ^GET\ .*/index\.(php|html)\ HTTP
    RewriteRule ^(.*)index\.(php|html)$ / [R=301,L]
    RewriteRule ^(.*)default\.(php|html)$ / [R=301,L]

    Thanks for any continued help!!!

  4. christychristine
    Member
    Posted 3 years ago #

    Ok, after not trying it last night, I added the WP_HOME and WP_SITEURL as you said, #mralokkp and it worked like a charm!

Topic Closed

This topic has been closed to new replies.

About this Topic