Page 2 of 2 First 12
  • Jump to page:
    #16
  1. Backwards Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    16,916
    Rep Power
    9646
    That does not look like index.php. Maybe you customized the installation?

    What is the first file that all WP code goes through? Assuming you already had to set up .htaccess for URL rewriting, the file I'm looking for will be mentioned in a RewriteRule. Probably the last one.
  2. #17
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2018
    Posts
    65
    Rep Power
    1
    this is in the same path as the modified htaccess

    PHP Code:
    <?php define('WP_USE_THEMES'true);

    /** Loads the WordPress Environment and Template */
    require( dirname__FILE__ ) . '/wp-blog-header.php' );
  4. #18
  5. Backwards Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    16,916
    Rep Power
    9646
    Okay. We're going to modify that to do the redirect. Because it's easier than trying to do it in the .htaccess. Because mod_rewrite isn't made to do string replacement.
    PHP Code:
    <?php define('WP_USE_THEMES'true);

    /** Redirect /?tag=/t+a+g to /tag/t-a-g/ */
    if (strncmp($_SERVER["REQUEST_URI"], "/?tag=/"7) == && $_SERVER["REQUEST_URI"] != "/?tag=/") {
        
    http_response_code(301);
        
    header("Location: /tag/" strtr(substr($_SERVER["REQUEST_URI"], 7), "+""-") . "/");
        exit;
    }

    /** Loads the WordPress Environment and Template */
    require( dirname__FILE__ ) . '/wp-blog-header.php' );
  6. #19
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2018
    Posts
    65
    Rep Power
    1
    YOU ARE THE BEST... work..
    Thank you very much!
Page 2 of 2 First 12
  • Jump to page:

IMN logo majestic logo threadwatch logo seochat tools logo