WebsiteBaker Community Forum

WebsiteBaker Support (2.8.x) => Bakery Shop => Topic started by: daydreamer on July 09, 2010, 04:05:29 PM

Title: Re: Hide "page" directory and "php" extension
Post by: daydreamer on July 09, 2010, 04:05:29 PM
@cosmorphis this works great for me thanks, how would I do the same for bakery aswell?
www.mydomainnameher e.com/pages/bakery/product

Thanks
Title: Re: Hide "page" directory and "php" extension
Post by: daydreamer on July 10, 2010, 07:58:49 PM
 :? could anyone help with this please
Thanks
Title: Re: Hide "page" directory and "php" extension
Post by: kweitzel on July 10, 2010, 08:18:32 PM
I moved your request into the Bakery support area. You might want to try to explain a bit better though!

cheers

Klaus
Title: Re: Hide "page" directory and "php" extension
Post by: daydreamer on July 11, 2010, 12:02:51 PM
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: [Select]
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