Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

default.php to index.php


shahed

Recommended Posts

I just installed a new snapshot, now since i'n not on windows server, my default file for a directory is index.php, how can change for oscommerce?Should I just rename default.php to index.php and make changes to aplication_top.php , after doing that I get an error. Am I doing something wrong?

What other way I can make sure customer will browse the site properly.

 

Shahed

Link to comment
Share on other sites

If you are using the Apache server, then open the httpd.conf, search for a directive like:

 

DirectoryIndex index.php index.php4 index.php3 index.cgi index.html index.htm

 

and add "default.php to the list. So your directive will look like:

 

DirectoryIndex default.php index.php index.php4 index.php3 index.cgi index.html index.htm

 

Hope this helps.

 

Rodrigo

Link to comment
Share on other sites

if that doesnt work then i suggest using my htaccess version:

 

# $Id: .htaccess,v 1.2 Steven Pignataro Exp $

#

# This is used with Apache WebServers

#

# The following makes adjustments to the SSL protocol for Internet

# Explorer browsers

#

# For this to work, you must include the parameter 'Limit' to the

# AllowOverride configuration

#

# Example:

#

#<Directory "/usr/local/apache/htdocs">

#  AllowOverride Limit

#</Directory>

#

# 'All' with also work. (This configuration is in your

# apache/conf/httpd.conf file)



DirectoryIndex default.php



<IfModule mod_setenvif.c>

 <IfDefine SSL>

   SetEnvIf User-Agent ".*MSIE.*" 

            nokeepalive ssl-unclean-shutdown 

            downgrade-1.0 force-response-1.0

 </IfDefine>

</IfModule>

 

this will point it to your default.php file

 

enjoy

Link to comment
Share on other sites

This is a pickle. Running apache on a linux box first off. As far as i know apache wil parse the .htaccess files before serving directory. I have read, and re-read, the topics posted on securing the admin directory and yet i still cant seem to get authorization to work... seems like it totally ignores anything i put in the .htaccess file and serves the page anyways. RH7.3 comes with apachectl application to control/configure apache. One setting that resides in the default is 'Let .htaccess files override directory options' i 'enabled' it but still, there is no 'validation' requests sent. im missing something SOMEWHERE... not sure where to look anymore.

Link to comment
Share on other sites

yes, i restarted apache when i changed httpd.conf.

i do apologize for getting taking the focus off of oscommerce. Upon reading further into the apache docs i believe the directives in my http.conf file needs to be addressed.... got some more reading to do:)

Link to comment
Share on other sites

  • 2 years later...

in your httpd.conf file make sure you have these two lines.

 

AllowOverride AuthConfig

AccessFileName .htaccess

 

 

then set up the .htaccess file in the directory you want to protect, the contents of the file should have these lines in it.

 

AuthName "Login to the Admin Area"

AuthType Basic

AuthUserFile /path/to/website/catalog/admin/.htpasswd

Require user username

 

then run the command

htpasswd /path/to/website/catalog/admin/.htpasswd username

 

It will prompt you for the password.

 

After setting it all up, run

service httpd configtest

to make sure your conf file is good, if it replies OK then reload the service

service httpd reload

 

Hope this helps.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...