Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

404 On all categories and product links on index.php


JSR

Recommended Posts

Hey everyone,

 

I have a big problem here with my product and category links. I can access my index page but when I click a category or product link I get a 404. On each and every one of them. I recently moved to a diffrent server and my host renamed my .htaccess file yesterday in order to password protect my directory. I couldn't get it to work myself in Plesk nor using my previous .htacces.

I have Ulltimate SEO Urls installed. I'm thinking it has something to do with the configuration for this contribution.

Can anyone maybe shed some light on this, please? :blush:

Link to comment
Share on other sites

Thats you answer the Rewrite is incorrect on your .htaccess.

It is there just invisible!

 

use the code below to create a new one and upload to the catalog directory

 

################################################################################

#

 

# $Id: .htaccess 1739 2007-12-20 00:52:16Z hpdl $

#

# 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>

 

# If Search Engine Friendly URLs do not work, try enabling the

# following Apache configuration parameter

 

# AcceptPathInfo On

 

# Fix certain PHP values

# (commented out by default to prevent errors occuring on certain

# servers)

 

# php_value session.use_trans_sid 0

# php_value register_globals 1

 

# SEF BEGIN

# Change ReWrite base according to where your store is located

# / is domain.com and /catalog is domain.com/catalog

 

 

Options +FollowSymLinks

RewriteEngine On

RewriteBase /

 

RewriteCond %{QUERY_STRING} ^options\=(.*)$

RewriteRule ^(.*)-p-(.*).html$ product_info.php?products_id=$2%1

 

RewriteRule ^(.*)-p-(.*).html$ product_info.php?products_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING}

RewriteRule ^(.*)-m-([0-9]+).html$ index.php?manufacturers_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-pi-([0-9]+).html$ popup_image.php?pID=$2&%{QUERY_STRING}

RewriteRule ^(.*)-t-([0-9]+).html$ articles.php?tPath=$2&%{QUERY_STRING}

RewriteRule ^(.*)-a-([0-9]+).html$ article_info.php?articles_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-pr-([0-9]+).html$ product_reviews.php?products_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-pri-([0-9]+).html$ product_reviews_info.php?products_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-i-([0-9]+).html$ information.php?info_id=$2&%{QUERY_STRING}

 

 

##########################################################

 

 

remembering to change RewriteBase /

if your store is not root.

 

Regards Nic

Sometimes you're the dog and sometimes the lamp post

[/url]

My Contributions

Link to comment
Share on other sites

Hi Fimble,

 

Thanks so much for your response! I tried your suggestion but no luck. My htaccess is similar to the one you posted except for this piece of code

RewriteCond %{QUERY_STRING} ^options\=(.*)$

Adding that did not solve anything.

 

The primairy htaccess file was renamed .htacces1, because my host explained it was blocking the password protection for the admin directory in Plesk. When I revert back to naming it htaccess, all the links are functioning correctly.

:rolleyes: But then ofcourse it would leave my admin unprotected, so I'm still looking for a solution to that problem...

Link to comment
Share on other sites

Hi Fimble,

 

Thanks so much for your response! I tried your suggestion but no luck. My htaccess is similar to the one you posted except for this piece of code

RewriteCond %{QUERY_STRING} ^options\=(.*)$

Adding that did not solve anything.

 

The primairy htaccess file was renamed .htacces1, because my host explained it was blocking the password protection for the admin directory in Plesk. When I revert back to naming it htaccess, all the links are functioning correctly.

:rolleyes: But then ofcourse it would leave my admin unprotected, so I'm still looking for a solution to that problem...

 

Ok there is another alternaitve to ultimate SEO

 

it uses this code in the .htaccess instead

 

# SEF BEGIN

# Change ReWrite base according to where your store is located

# / is domain.com and /catalog is domain.com/catalog

RewriteEngine on

RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*) index.php

# SEF END

 

I take it that its called SEF

 

I did an install on a pleask a week or two ago, and had no problems with the .htaccess

Plenty of problems with the configure files though!

 

Sigh, if only it were all as good as Linux

 

Anyway, it might help you.

 

Or there may be someone else more genned up on rewrites etc on here that can help more.

Have you had a play with the Admin settings?

Think there is something there under SEO about rewrites, could be wrong tho.

Nic

Sometimes you're the dog and sometimes the lamp post

[/url]

My Contributions

Link to comment
Share on other sites

Soooo... I had this piece of code in my catalog htaccess... It was put there when the shop was under construction and I set it to Satisfy Any when my store was going live!

 

AuthType basic

AuthName "Secured area"

AuthUserFile /home/httpd/vhosts/myurl/httpdocs/.ok_user

Satisfy Any

 

After I removed that piece of code, and deleted the admin htaccess I was able to password protect the admin directory by simply following plesk's procedure. No 404 errors anymore!

O gosh, feeling quite dense now. <_<

Thanks for trying to help me out Fimble!!!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...