Reputation:
Using .htacess on a Joomla website, I need to replace:
example.com/e-books/whatever-text-etc
By:
example.com/whatever-text-etc
This is what I'm trying:
RewriteRule ^e-books$ /(\d{4}-.*)$1 [R=301,L]
But it isn't working.
Help anyone?
Upvotes: 0
Views: 45
Reputation: 1
If you do not have more articles, you can create new menu item (parent) and link to your article. So, you will have URL for your article like example.com/whatever-text-etc
Then, if you want to hide this menu item in your menu bar, you just disable this option in details of menu item http://take.ms/rnTXl
Upvotes: 0
Reputation:
After researching, I've found that this works:
RewriteEngine on
RewriteCond %{THE_REQUEST} \s/+e-books/(\S*)\s [NC]
RewriteRule ^ /%1 [R=301,L,NE]
Upvotes: 1