Web Design Tutorials osCommerce Template Tutorials
New osCommerce Templates osCommerce Specials osCommerce Forums Search Our Site Contact Us Resources Web Design Tutorials
Web Designers Library- Tutorials and Articles
Tutorial Search
  Advanced Search
 
Tutorial Menu
 
 Video Tutorials
  · Dreamweaver
  · osCommerce
  · Installations
 
 Photoshop
  · Tutorials
  Photoshop Basics
  Special Effects
  Text Effects
  3D Effects
  Textures & Patterns
  Web Layout
  Drawing Techniques
  Color Management
  Photo Editing
  ImageReady Animation
  Miscellaneous
  · Articles
 
 Web Design Basics
  · Design Principles
  · Website Usability
  · Color Theory
  · Templates & Tuning
 
 osCommerce
  · osCommerce Knowledgebase
  Catalog Area
  Installation and Upgrades
  Administration Tool
  General Information
  Developers Section
What's New
Latest Tutorials and Articles
Video Tutorials
osCommerce Tutorials
Template installation with cPanel and Ipswitch
Photoshop
Photoshop CS3: Output Sharpening
Change Color on an Object
Sunlight Effect
Autumn Effect
Eyes in Green Pea Pod
Web Design Basics
A To Z About RSS
Elements of Great Websites
The Next Generation Website Model
Why Use a Web Design Template?
Web Site Templates and Their Benefits
osCommerce
SSL - This page contains secure and non secure items
Post-Installation
Security - .htaccess
SSL - This page contains secure and non secure items
Tax Proposal
osCommerce : osCommerce Knowledgebase : General Information Last Updated: Feb 26th, 2007 - 21:06:21


Security - .htaccess
Author: oscommerce.info
Authors Website: oscommerce.info
Oct 23, 2006, 20:21

Email this article
 Printer friendly page
Introduction

osCommerce has .htaccess files already in place in the (admin directory, for example). These files are in fact Apache server configuration files so they can do more than control access. Because they start with a dot, they do not appear on normal unix directory listings, so they are easy to miss.

More information on what can be done in .htaccess (or the main Apache configuration files) is available online at
www.apache.org

Explanation of .htaccess in osCommerce

The osCommerce .htaccess file in the catalog folder is as follows:

# $Id: .htaccess,v 1.3 2003/06/12 10:53:20 hpdl Exp $
#
# This is used with Apache WebServers
#
# For this to work, you must include the parameter 'Options' to
# the AllowOverride configuration
#
# Example:
#
# <Directory "/usr/local/apache/htdocs">
# AllowOverride Options
# </Directory>
#
# 'All' with also work. (This configuration is in the
# apache/conf/httpd.conf file)

# The following makes adjustments to the SSL protocol for Internet
# Explorer browsers

<IfModule mod_setenvif.c>
<IfDefine SSL>
SetEnvIf User-Agent ".*MSIE.*" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
</IfDefine>
</IfModule>
# Fix certain PHP values (commented out by default to prevent errors occuring on certain servers)
# The <IfModule container should be used to house these listings otherwise, if the PHP installation fails so will the web server.
<IfModule mod_php4.c>
#php_value session.use_trans_sid 0
php_value register_globals 1
</IfModule>

NOTE: If the register_globals error does not go away after this section above is uncommented then uncomment the one line only like shown below for the error "register_globals is not enabled in php.ini ... Please enable it!" The "IfModule" directive for PHP doesn't work for all Apache servers (it depends on how PHP was installed). It is not needed if you know that your Apache installation will always include the PHP module.

#<IfModule mod_php4.c>
#php_value session.use_trans_sid 0
php_value register_globals 1
#</IfModule>

# Add for oscommerce safe engine urls set to true in admin - uncomment to use if you get a blank page while clicking on any product links.
# AcceptPathInfo On



Top of Page

 
Level Ten Hosting