Forums

template_redirect issue - all top level pages redirecting to posts (1 post)

  1. g18c
    Member
    Posted 8 months ago #

    Hi i am having a few issues with template_redirect, i have the following code but when i activate this plugin it seems all of my top level pages when clicked redirect to posts page. I can confirm the links are correct, I can not work out why it would redirect.

    Appreciate any pointers.

    Many thanks in advance,

    Chris

    [Code moderated as per the Forum Rules. Please use the pastebin]

    I can also see the following extra_permastructs with the Ask Apache Rewrite rules:

    /category/%category%
    0
    /tag/%post_tag%
    0
    /type/%post_format%
    0
    //%formid%
    0
    /testimonials/%testimonial%
    1

    Any my .htaccess file is below:

    # BEGIN WordPress
    
    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteBase /
    RewriteRule ^downloads/([^/]+)$ http://www.mydomain.com/wp-content/plugins/download-monitor/download.php?id=$1 [L]
    </IfModule>
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress
    RewriteCond %{HTTP_HOST} ^cp\.mydomain\.com$ [OR]
    RewriteCond %{HTTP_HOST} ^www\.cp\.mydomain\.com$
    RewriteRule ^/?$ "https\:\/\/cp\.mydomain\.com\/" [R=301,L]

Reply

You must log in to post.

About this Topic