I normally wouldn’t post on here and try to figure things out myself but I’m at my wits end.
I’m trying to perform a redirect in WordPress so that requests to:
/property/123-my-unique-uri-here
… get forwarded onto a file called /property-details.php
but the URL remains the same in the address bar.
Here’s what I’ve tried:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^property/(.*)$ /wp-content/themes/Divi/property-details.php?uri=$1 [QSA,L]
</IfModule>
However, when I visit the URL /property/123-my-unique-uri-here
I just got forwarded to the homepage.
If anyone has any ideas at all I’d be eternally grateful!
try this:
Another option is to just use a 301: