WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.8 is now available!


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Bakery Shop »
  • Re: Hide "page" directory and "php" extension
  • Print
Pages: [1]   Go Down

Author Topic: Re: Hide "page" directory and "php" extension  (Read 9823 times)

daydreamer

  • Guest
Re: Hide "page" directory and "php" extension
« 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
« Last Edit: July 09, 2010, 04:08:20 PM by Argos »
Logged

daydreamer

  • Guest
Re: Hide "page" directory and "php" extension
« Reply #1 on: July 10, 2010, 07:58:49 PM »
 :? could anyone help with this please
Thanks
Logged

Offline kweitzel

  • WebsiteBaker Org e.V.
  • **
  • Posts: 6983
  • Gender: Male
Re: Hide "page" directory and "php" extension
« Reply #2 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
Logged

daydreamer

  • Guest
Re: Hide "page" directory and "php" extension
« Reply #3 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
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Bakery Shop »
  • Re: Hide "page" directory and "php" extension
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2