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.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


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 »
  • General Community »
  • Global WebsiteBaker 2.8.x discussion »
  • Add to your installation with htacess
  • Print
Pages: [1]   Go Down

Author Topic: Add to your installation with htacess  (Read 5847 times)

Offline Xagone

  • Posts: 482
  • Gender: Male
  • Developper
    • Xagone Inc
Add to your installation with htacess
« on: October 16, 2010, 07:42:16 PM »
here some HTACCESS trics i've done with Website Baker.

ad a 404 page within website baker by pointing it to a web page, more in my topic about "How to make legit 404 error page"

Make html parsable as PHP, so you can set your settings to have your page extension to ".html"
Code: [Select]
AddHandler application/x-httpd-php5 .xml .php .htm .html or
Code: [Select]
AddHandler application/x-httpd-php .xml .php .htm .html depending on your hosting

if you use fancybox with your template, there is some problems within Internet Explorer, this is a trick to fool IE to know where your fancybox is. (change the path to your fancybox)
Code: [Select]
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} ^Mozilla/4(.*)MSIE
RewriteRule ^fancybox/([^/]*)\.png$ /path/to/fancybox/$1.png [L]

Compress all content, manually excluding specified file types (if it's not already done within apache configs)
Code: [Select]
<IfModule mod_deflate.c>
  SetOutputFilter DEFLATE
  SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png|rar|zip)$ no-gzip
  <IfModule mod_headers.c>
    Header append Vary User-Agent
  </IfModule>
</IfModule>

enable you to have your google sitemap as "sitemap.xml" instead of "google_sitemap.php"
Code: [Select]
RewriteEngine on
RewriteRule ^sitemap.xml$ google_sitemap.php
Logged
Xagone Inc. (formerly VotreEspace)
http://xagone.com/

Offline Xagone

  • Posts: 482
  • Gender: Male
  • Developper
    • Xagone Inc
Re: Add to your installation with htacess
« Reply #1 on: October 17, 2010, 05:40:58 PM »
This code will be applied if you call a .html that does not phisicly exist, and will attempt to show you an .php equivalent (like http://domaind.com/allo.html, will try to show you http://domaind.com/allo.php instead)
Code: [Select]
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)\.html$ $1.php
works if you changed your "page extension" settings but do not want to rename all your php into html.

but you need to parse html file as PHP (see above) because NEW file will be .html
Logged
Xagone Inc. (formerly VotreEspace)
http://xagone.com/

Offline sparkdigital

  • Posts: 366
  • Once a baker, always a baker!
    • romantic hotels
Re: Add to your installation with htacess
« Reply #2 on: October 22, 2010, 12:16:59 PM »
Nice trick? What are the advantages of having .html rather than .php?
Logged

Offline Xagone

  • Posts: 482
  • Gender: Male
  • Developper
    • Xagone Inc
Re: Add to your installation with htacess
« Reply #3 on: October 22, 2010, 01:27:11 PM »
Visual and detherant

more cute, and if you get rid of the "/pages" the site seams to not be run by a cms, wich looks more pro.

normaly on my sites I change the /admin folder name, get rid of /pages and move to php parsed .html, so the site looks almost static.
Logged
Xagone Inc. (formerly VotreEspace)
http://xagone.com/

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • General Community »
  • Global WebsiteBaker 2.8.x discussion »
  • Add to your installation with htacess
 

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