Web Development

  Homes arrow Web Development arrow Page 3 - HTACCESS Wrappers with PHP
 Webmaster Tools
Base64 Encoding 
Browser Settings 
CSS Coder 
CSS Navigation Menu 
Datetime Converter 
DHTML Tooltip 
Dig Utility 
DNS Utility 
Dropdown Menu 
Fetch Content 
Fetch Header 
Floating Layer 
htaccess Generator 
HTML Encoder 
HTML Entities 
IP Convert 
Meta Tags 
Password Encryption
Password Strength
Pattern Extractor 
Ping Utility 
Pop-Up Window 
Regex Extractor 
Regex Match 
Scrollbar Color 
Source Viewer 
Syntax Highlighting 
URL Encoding 
Web Safe Colors 
Forums Sitemap 
Weekly Newsletter
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Contact Us 
Site Map 
Privacy Policy 
  >>> SIGN UP!  
  Lost Password? 

HTACCESS Wrappers with PHP
By: Jase Dow
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 2

    Table of Contents:
  • HTACCESS Wrappers with PHP
  • That's all you've...
  • That contains the...
  • The same basic...
  • If our wrapper...
  • Without HTTP compression...
  • A practical way...
  • I've included several...
  • You could also...

  • Rate this Article: Poor Best 
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article




    HTACCESS Wrappers with PHP - That contains the...

    (Page 3 of 9 )

    That contains the htaccess file and PHP wrapper script, along with a sample header, footer, and a test page. Upload all five files to your web host, chmod htaccess.txt to 0755 then rename it to ".htaccess". It might disappear from your directory listing which is okay, it should still be there.

    Load, in your browser, the copy of sample.html residing on your web server. The text "This is my header" should appear at the top while "This is my footer" should show on the bottom. If you open up the actual file called sample.html, you'll see that these actually aren't there. They've been added in by the script all HTML files in the folder "header" must now pass through.

    This is how wrappers work. Certain things, like adding custom headers and footers are done "on the fly" without modifying your original file. You'll get the same effect if you create other HTML files and upload them to this folder.

    Files without ".html" or ".htm" extensions, such as text files or images, won't show these headers or footers. This is a good thing because text files aren't part of the presentation on a web site and adding extra text to images will corrupt them. It affects all HTML files within your /headers folder, and none of the files outside of it.

    If you wanted, you could add or remove any file extensions you want, just by adding or taking away those "AddHandler" lines.

    To get everything back to normal, either delete your .htaccess file or upload a blank .htaccess file in that folder, and all will be well again.


    More Web Development Articles
    More By 359



    - On Page SEO for New Domains
    - Improve Your Site`s Speed
    - Safari Books Online Review
    - Creating an Estore From the Ground Up
    - Most Common SEO Mistakes Developers Make
    - Making the Most of Your Titles and Meta Desc...
    - Five Ways Using Flash Can Damage Your Site
    - A Web Designer`s Guide to Colors
    - Use Webstarts to Create a Free Site
    - More Than Just Looks. How Your Web Design C...
    - How to Design Content Pages
    - Mint Review
    - Make Your WordPress Website Look Professional
    - How to Create a Mobile Web Site
    - Meta Tags: Still Useful?

    Developer Shed Affiliates


    © 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap