Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Error "Index of /"


mark75

Recommended Posts

Hi! I'm very new around here. I have a simple question. I install on my domanin an oscommerce 2X and it's ok. But when I want to acees my site, I see

 

"Index of /

 

* .cpanel/

* .fantasticodata/

* .lastlogin

* .spamassassinenable

* .sqmailattach/

* .sqmaildata/

* .trash/

* catalog/ ".

 

I move the index.php on public_html from /catalog but is more errors like this.

Some ideas? Thank you!

Link to comment
Share on other sites

Your store was installed into the "catalog/" directory, which is the usual configuration. Put index.php back there. You have two problems to address:

1. Visitors can look in your root directory, because it has no "index" file, and

2. Visitors need to be redirected from / to /catalog

 

If you are on an Apache server (any Linux installation, some Windows installation), add the following to your /.htaccess file:

RewriteEngine On
RewriteCond  %{REQUEST_URI}  !^/catalog  [NC]
RewriteRule  ^(.*)$  /catalog/$1  [L]

Note that you may have to add other RewriteCond lines to exclude robots.txt, favicon.ico, and various error documents which you will be eventually adding. Also note that this does not work for Windows/IIS servers.

 

An alternative, which would also work on an IIS server, is to instead create a file /index.html:

<html>
 <head>
   <meta http-equiv="refresh" content="0; url=/catalog/index.php" >
   <title>Redirecting to Store</title>
 </head>
 <body>
<p>Redirecting to store. If this does not happen immediately, 
<a href="/catalog/index.php">Click Here</a>.</p>
 </body>
</html>

Don't forget that both your configure.php files need to define that the store is in "catalog/" and not "/"

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...