WebsiteBaker Support (2.8.x) > Bakery Shop
Re: Hide "page" directory and "php" extension
(1/1)
daydreamer:
@cosmorphis this works great for me thanks, how would I do the same for bakery aswell?
www.mydomainnameher e.com/pages/bakery/product
Thanks
daydreamer:
:? could anyone help with this please
Thanks
kweitzel:
I moved your request into the Bakery support area. You might want to try to explain a bit better though!
cheers
Klaus
daydreamer:
I'm using a mod_rewrite which removes the pages directory
Instead of : www.mydomain.com/pages/page.php
Outputs: www.mydomain.com/page
I am also using backery but cant seem to remove /pages/backery/productname.php here is the rewrite rule if anyone could help
--- Code: ---RewriteEngine on
#If 404 Not Found error, go to homepage
ErrorDocument 404 /index.php
RewriteEngine on
#If URL received with trailing slash (e.g. http://domain/test/) then go to correct page (e.g. http://domain/pages/test.php)
RewriteRule ^([^.]+)/$ pages/$1.php
#If URL received WITHOUT trailing slash (e.g. http://domain/test) then go to correct page (e.g. http://domain/pages/test.php)
RewriteRule ^([^.]+)$ pages/$1.php
#When user types in http://domain/admin or http://domain/admin/, it looks for http://domain/pages/admin.php, which doesn't exist, because of the previous rules. This corrects that.
RewriteRule pages/admin.php admin/index.php
--- End code ---
Navigation
[0] Message Index
Go to full version