Viewing 15 replies - 1 through 15 (of 15 total)
  • First try visiting Settings -> Permalinks in the admin. If a simple visit to this page doesn’t work, try changing to Default. Did that make the pages show up? I realise that isn’t a pretty permalink, but it rules out folder issues pretty much.

    Thread Starter RaeMcD

    (@raemcd)

    Hello Ben,

    Thanks for getting back to me. I have tried to reset the permalinks to default or to the “ugly” permalinks but when I do that it is like my whole re-direct is wiped out and I can no longer see anything on the URL (a blank page, where the homepage used to me).

    Any reason why this would be?

    Thanks again! ??

    Thread Starter RaeMcD

    (@raemcd)

    and then after it is wiped out I need to re-upload my .htaccess file for me to get my homepage to show up again

    here is the .htaccess file I am using, that is allowing me to see the redirected homepage:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^(www.)?afsjoints.com$
    RewriteRule ^(/)?$ afs[L]
    RewriteBase /afs/
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    </IfModule>

    # END WordPress

    Thread Starter RaeMcD

    (@raemcd)

    one last thing, this is the error I get when I try and click on a link:

    “Not Found [CFN #0005]”

    Even though when I go into my pages it shows that they are named the way they should be to be directly linked:

    aka “https://afsjoints.com/contact-us/

    On this page, there is a section titled “Using a pre-existing subdirectory install”. Follow that carefully, ensuring that your WordPress Address in Settings -> General is set to “https://www.afsjoints.com/afs&#8221; and Site Address is set to https://www.afsjoints.com. Also make sure that your web server has permission to write to public_html/.htaccess.

    Also, as was suggested in the thread you linked to, why not just serve afsjoints.com from public_html/afs if there isn’t anything else running on afsjoints.com?

    Thread Starter RaeMcD

    (@raemcd)

    That is how I have it set up in my ftp public_html/afs these are where my core WP files are.

    I am pointing everything from the afsjoints.com/afs folder to afsjoints.com

    is that correct? Also I have been to that link you posted and to my knowledge have followed it to the T, which is why i am confused by why it isn’t working.

    and my general settings are on: https://afsjoints.com/afs
    and site address: afsjoints.com

    but I do have a question on that link it says add that line:

    require( dirname( __FILE__ ) . ‘/afs/wp-blog-header.php’ );

    to the root directory index. Am I copying the index from my main theme or the index file that is directly under the /afs folder? Right now I have it set as the index.php file from my main theme and have this line under the php brackets, like this:
    —————————————————————————

    <?php get_header(); ?>
    <div class=”b my-page”>
    <?php
    global $myLayout;
    $myLayout = new layout( ” );
    ?>
    <div class=”container <?php echo $myLayout -> containerClass; ?>”>

    <?php
    $myLayout -> echoSidebar( );
    ?>

    <div class=”<?php echo $myLayout -> contentClass( ); ?>”>

    <?php
    if( !myThemes::get( ‘blog-page’ ) ){
    ?>
    <h1 class=”title”>
    <span><?php echo myThemes::get( ‘blog-page-label’ ); ?></span>
    </h1>
    <?php
    }
    ?>
    <div class=”blogging”>

    <?php
    if( have_posts() ){
    while( have_posts() ){
    the_post();
    get_template_part( ‘cfg/templates/view/blog’ );
    }
    }
    ?>
    </div>
    <?php get_template_part( ‘cfg/templates/pagination’ ); ?>
    </div>
    <div class=”clearfix”></div>
    </div>
    </div>

    <?php get_footer(); ?>

    require( dirname( __FILE__ ) . ‘/afs/wp-blog-header.php’ );

    Ok – that could be the problem. Two things:

    – You need to copy the index.php file from /public_html/afs/index.php not /public_html/afs/wp-content/themes/whatever/index.php. If it’s in a theme folder it’s a theme file not a core WordPress file. That looks like a theme file to me.

    – You aren’t ADDING a line, you are CHANGING a line. If the line isn’t there, you got the wrong file.

    Let us know!

    Thread Starter RaeMcD

    (@raemcd)

    ok so I took the main index.php file and CHANGED that line of text here is what it looked like when I uploaded it to the ROOT file (public_html)

    ———————————————————————–

    <?php
    /**
    * Front to the WordPress application. This file doesn’t do anything, but loads
    * wp-blog-header.php which does and tells WordPress to load the theme.
    *
    * @package WordPress
    */

    /**
    * Tells WordPress to load the WordPress theme and output it.
    *
    * @var bool
    */
    define(‘WP_USE_THEMES’, true);

    /** Loads the WordPress Environment and Template */
    require( dirname( __FILE__ ) . ‘afs/wp-blog-header.php’ );

    —————————————————————————-
    And then I reuploaded my .htacess file too on the root folder

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^(www.)?afsjoints.com$
    RewriteRule ^(/)?$ afs[L]
    RewriteBase /afs/
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    </IfModule>

    # END WordPress

    —————————————————————————

    But it still isn’t working :/

    thank you so much for trying to help me with this btw, I’ve been stuck all day :p

    is my index file missing an ending php bracket?

    This isn’t right:

    require( dirname( __FILE__ ) . ‘afs/wp-blog-header.php’ );

    This is:

    require( dirname( __FILE__ ) . ‘/afs/wp-blog-header.php’ );

    Notice the forward slash.

    Thread Starter RaeMcD

    (@raemcd)

    Ok I’ve changed the index.php file adding in that forward slash

    require( dirname( __FILE__ ) . ‘/afs/wp-blog-header.php’ );

    and added that to the root directory… it still is giving me the error with the links

    Thread Starter RaeMcD

    (@raemcd)

    also my permalink is set at post name setting:

    https://afsjoints.com/sample-post/

    Thread Starter RaeMcD

    (@raemcd)

    OMG I GOT IT!! I think the trouble was me using the wrong index.php file! Now that I have the right one, I tried to change the permalinks to DEFAULT and it now WORKS! WOHOO! THANK YOU! THANK YOU!! ??

    Boom!

    Thread Starter RaeMcD

    (@raemcd)

    That is a great feeling! ?? Thanks again Ben! ??

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Need help with permalinks not working after repointing url’ is closed to new replies.