How can I remove main/
in http://domain/main/about
so the URL will be like this http://domain/about
Thanks
To request removal of a directory or site, click on the site in question, then go to Site configuration > Crawler access > Remove URL. If you enter the root of your site as the URL you want to remove, you'll be asked to confirm that you want to remove the entire site.
An option using regex /[^/]+$ and replace with an empty string. This matches the last foward slash until the end of the string.
Give the last element to the strip method, it will return the string by removing the last character.
Well, in the absence of any further details, you could try something like this:
RewriteRule (.*)/main/(.*) $1/$2
But this is a VERY broad rule - you'd probably want to tune it more tightly than that. Try turning the RewriteLogLevel to 9 and watching the rules as they get processed so you can get a better idea of what is being matched.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With