• i have a domain with wordpress and oscommerce installations on it. wordpress is in the root, oscommerce is in the /store/ dir off the root. the site works fine and displays properly in both wordpress and oscommerce. however in oscommerce the server headers are throwing 404 errors even though the page is displaying properly. this means that googlebot is not indexing these pages at all and that is a major issue. any help on this would be greatly appreciated.

    the site is http://www.outdoorwatersolutions.com/
    the root htaccess is:

    RemoveHandler .html .htm
    AddType application/x-httpd-php .php .htm .html
    
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^outdoorwatersolutions.com [NC]
    RewriteRule ^(.*)$ http://www.outdoorwatersolutions.com/$1 [L,R=301]
    
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    and the oscommerce htaccess is:

    Options +SymLinksIfOwnerMatch
    <IfModule mod_rewrite.c>
      RewriteEngine On
    
      # RewriteBase instructions
      # Change RewriteBase dependent on how your shop is accessed as below.
      # http://www.mysite.com = RewriteBase /
      # http://www.mysite.com/catalog/ = RewriteBase /catalog/
      # http://www.mysite.com/catalog/shop/ = RewriteBase /catalog/shop/
    
      # Change RewriteBase using the instructions above
      RewriteBase /store/
      RewriteRule ^([a-z0-9/-]+)-p-([0-9]+).html$ product_info.php [NC,L,QSA]
      RewriteRule ^([a-z0-9/-]+)-c-([0-9_]+).html$ index.php [NC,L,QSA]
      RewriteRule ^([a-z0-9/-]+)-m-([0-9]+).html$ index.php [NC,L,QSA]
      RewriteRule ^([a-z0-9/-]+)-pi-([0-9]+).html$ popup_image.php [NC,L,QSA]
      RewriteRule ^([a-z0-9/-]+)-pr-([0-9]+).html$ product_reviews.php [NC,L,QSA]
      RewriteRule ^([a-z0-9/-]+)-pri-([0-9]+).html$ product_reviews_info.php [NC,L,QSA]
      # Articles contribution
      RewriteRule ^([a-z0-9/-]+)-t-([0-9_]+).html$ articles.php [NC,L,QSA]
      RewriteRule ^([a-z0-9/-]+)-au-([0-9]+).html$ articles.php [NC,L,QSA]
      RewriteRule ^([a-z0-9/-]+)-a-([0-9]+).html$ article_info.php [NC,L,QSA]
      # Information pages
      RewriteRule ^([a-z0-9/-]+)-i-([0-9]+).html$ information.php [NC,L,QSA]
      # Links contribution
      RewriteRule ^([a-z0-9/-]+)-links-([0-9_]+).html$ links.php [NC,L,QSA]
      # Newsdesk contribution
      RewriteRule ^([a-z0-9/-]+)-n-([0-9]+).html$ newsdesk_info.php [NC,L,QSA]
      RewriteRule ^([a-z0-9/-]+)-nc-([0-9]+).html$ newsdesk_index.php [NC,L,QSA]
      RewriteRule ^([a-z0-9/-]+)-nri-([0-9]+).html$ newsdesk_reviews_info.php [NC,L,QSA]
      RewriteRule ^([a-z0-9/-]+)-nra-([0-9]+).html$ newsdesk_reviews_article.php [NC,L,QSA]
    </IfModule>

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter security_man

    (@security_man)

    just an update. aparently you should have all your rewrites in the root htaccess file for both oscommerce and wordpress, however i am still not able to get the following code to work. any ideas out there?

    RewriteRule ^store/([a-z0-9/-]+)-p-([0-9]+)\.html$ product_info.php [NC,L,QSA]
    RewriteRule ^store/([a-z0-9/-]+)-c-([0-9_]+)\.html$ index.php [NC,L,QSA]
    RewriteRule ^store/([a-z0-9/-]+)-m-([0-9]+)\.html$ index.php [NC,L,QSA]
    RewriteRule ^store/([a-z0-9/-]+)-pi-([0-9]+)\.html$ popup_image.php [NC,L,QSA]
    RewriteRule ^store/([a-z0-9/-]+)-pr-([0-9]+)\.html$ product_reviews.php [NC,L,QSA]
    RewriteRule ^store/([a-z0-9/-]+)-pri-([0-9]+)\.html$ product_reviews_info.php [NC,L,QSA]
    # Articles contribution
    RewriteRule ^store/([a-z0-9/-]+)-t-([0-9_]+)\.html$ articles.php [NC,L,QSA]
    RewriteRule ^store/([a-z0-9/-]+)-au-([0-9]+)\.html$ articles.php [NC,L,QSA]
    RewriteRule ^store/([a-z0-9/-]+)-a-([0-9]+)\.html$ article_info.php [NC,L,QSA]
    # Information pages
    RewriteRule ^store/([a-z0-9/-]+)-i-([0-9]+)\.html$ information.php [NC,L,QSA]
    # Links contribution
    RewriteRule ^store/([a-z0-9/-]+)-links-([0-9_]+)\.html$ links.php [NC,L,QSA]
    # Newsdesk contribution
    RewriteRule ^store/([a-z0-9/-]+)-n-([0-9]+)\.html$ newsdesk_info.php [NC,L,QSA]
    RewriteRule ^store/([a-z0-9/-]+)-nc-([0-9]+)\.html$ newsdesk_index.php [NC,L,QSA]
    RewriteRule ^store/([a-z0-9/-]+)-nri-([0-9]+)\.html$ newsdesk_reviews_info.php [NC,L,QSA]
    RewriteRule ^store/([a-z0-9/-]+)-nra-([0-9]+)\.html$ newsdesk_reviews_article.php [NC,L,QSA]
    
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

    I might be having the same problem…I have an oCommerce store & I just created a wordpress website that I could combine with the store so I could include the store along with education and other information. The store is not live yet but when I put the two together I was still able to edit the oCommerce store and all of a sudden I’m getting 404 error page. Please help!!

    Thread Starter security_man

    (@security_man)

    finally found the problem.

    i was using wordpress functions in my oscommerce installation by using the following two lines in my oscommerce application_top.php:

    define('WP_USE_THEMES', false);
    require('./wp-blog-header.php');

    this caused the 404 error even though the page showed up because wordpress was trying to find the file in its database.

    the solution was to require wp-load.php instead of wp-blog-header.php – fixed it right up

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘wordpress and oscommerce htaccess problem’ is closed to new replies.