I have a WP site, all working great. I then have a stand alone landing page called "landing-page.php" and this is in the root directory.
I need to remove the .php and the trailing slash in order for the page to load. I only want to remove the trailing slash for this specific page. I cannot change the directory where this page is saved as I have ad campaigns that have been configured with /landing-page/ so I cannot go change these without re-approval etc
I have the following code which kinda works BUT... I cannot access /wp-admin.
So I need the rules only to apply to this landing page:
RewriteEngine On
RewriteRule ^(.*)/$ /$1 [L,R=301]
RewriteRule ^landing-page$ landing-page.php [L]
# BEGIN WordPress
<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
Please help... thanks