.htaccess mod_rewrite permalinks
-
This maybe a stupide question but my client is pretty firm that they want this doing so I kind of need to find out if its even possible.
Basically I have a page lets call it ‘page1’ and a child of that page ‘page2’ the url to page2 at present is https://www.url.com/page1/page2 with permalinks enabled to be a custom structure – /%category%/%postname%/
What my client is requiring is that page2 sits under page1 in the page navigation but when clicked on navigates to – https://www.url.com/page2 effectively missing out the parent page title in the url. He also only wants this to happen with 1 specific url not on the whole site.
First question is…is this possible? Second question is how!?
I have had a developer friend help me out with some ideas and still no joy, here is the attempt on the .htaccess file:
# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /beta/ RewriteRule ^url-i-want-to-write\/?$ /actual-path/to-url RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /beta/index.php [L] </IfModule> # END WordPress <IfModule mod_security.c> <Files async-upload.php> </Files> </IfModule>
RewriteRule ^url-i-want-to-write\/?$ /actual-path/to-url
Is the line that was added…
Any help would be greatly appreciated. Thanks.
- The topic ‘.htaccess mod_rewrite permalinks’ is closed to new replies.