Permalinks (Post name) – Existing Rewrite Causing Issues?
-
Hi,
My website has an existing rewrite already in the .htaccess which is the following:
<IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php?url=$1 [QSA,L] </IfModule>
With this rewrite in place I’m able to navigate my regular website properly and the index page of my WordPress site loads properly at the following domain.
When I hover over the URLs listed in my WordPress site they seem to show up properly with the Post name Permalinks.
https://www.domain.com/wp/hello-world
However, when I click on one the link the page is not found. I’m guessing it’s because I don’t have the exact rewrite code that WordPress provided me installed below.
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase /wp/ RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /wp/index.php [L] </IfModule>
However, if I install the code above then the links on my regular website don’t work properly and I get sent to my WordPress site.
Does anyone know how I can properly set this .htaccess rewrite code up so everying works properly?
Thank you!
- The topic ‘Permalinks (Post name) – Existing Rewrite Causing Issues?’ is closed to new replies.