Jan 20, 2013 at 9:46 PM
Edited Jan 20, 2013 at 10:47 PM
For BE 2.7:
It is quite easy to remove one of these from the url... but a little harder to do both. There are only a couple of files that need to be modified. (Can only be done with the source code)
Lets just do the posts first:
You can comment out this line (as we should not have /post/ in the url soon)... This is in the
at the end of this file, you will need to add an else statement... basically a catch everything else which will be the post rewrite.
Finally, we just need to take /post/ out of the relative link method in the post class.
The same principle applies to the pages, but as the else statement (2nd pic above) is picking up the post, you will have to change this to the page rewrite.
If you want both the page and post removed from the url, you will need to do some cleverness in the else statement (pic 2) above (I've not attempted this yet). You will need to test if the post rewrite works and if not have a go at the page rewrite
(or vice versa)... remember if you have a post and a page with the same name, only one is going to be delivered.
Once you have it working fine, just publish the website to a folder using visual studio and you're done.