• benknight

    (@benknight)


    I’m trying to add my own custom rewrite rule to the WordPress .htaccess file but whenever I visit the URL I have the rewrite rule set on, I just get a 404 “Page Not Found” as if WordPress were trying to locate the page by that path and failing. Shouldn’t my custom rule execute before WordPress tries to find it? Here’s the code:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule ^products/all$ index.php?post_type=product [L,NC]
    </IfModule>
    
    # BEGIN WordPress
    
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /ac/
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /ac/index.php [L]
    </IfModule>
    
    # END WordPress

    Any help is appreciated!

  • The topic ‘"Page Not Found" despite custom rewrite rule’ is closed to new replies.