Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2006
    Posts
    308
    Plugin Contributions
    0

    Default Using Wordpress in zc - Problem with index.php URL

    So I have kind of a mess of htaccess rewrites. They are a combination of lines from CEON URI Mapping and some instructions I found here about how to display my Wordpress blog inside zc:

    https://www.numinix.com/blog/2009/09...n-cart-1-3-8a/

    It appears to work fine, but my problem is Google is indexing all my blog posts with an appended index.php at the end for some reason. And every time a visitor clicks through on such a link, ie:
    http://www.mysite.com/blog/how-to-ma...uits/index.php
    it gives a 404 error.

    How can I modify this to remove the index.php from all URL paths starting with /blog/ ?


    Code:
    RewriteEngine On
    
    # Don't rewrite any URIs ending with a file extension (ending with .[xxxxx])
    RewriteCond %{REQUEST_URI} !\.[a-z]{2,5}$ [NC]
    # Don't rewrite admin directory
    RewriteCond %{REQUEST_URI} !^/sysop [NC]
    # Don't rewrite editors directory
    RewriteCond %{REQUEST_URI} !^/editors [NC]
    # Don't rewrite cPanel directories
    RewriteCond %{REQUEST_URI} !/cpanel [NC]
    RewriteCond %{REQUEST_URI} !/frontend [NC]
    # Don't rewrite blog directory
    RewriteCond %{REQUEST_URI} !^/blog [NC]
    
    # Handle all other URIs using Zen Cart (index.php)
    RewriteRule .* index.php?%{QUERY_STRING} [L]
    
    # Rewrite blog directory to display WP inside zencart, but exclude the blog-backend directory because that's my actual WP directory
    RewriteCond %{REQUEST_URI} !^/blog-backend [NC]
    RewriteRule ^blog(.*)$ index.php?main_page=blog&$1 [E=VAR1:$1,QSA,L]
    Last edited by fakeDecoy; 26 Sep 2015 at 03:58 PM.

  2. #2
    Join Date
    Nov 2007
    Location
    Woodbine, Georgia, United States
    Posts
    4,019
    Plugin Contributions
    61

    Default Re: Using Wordpress in zc - Problem with index.php URL

    Try this

    Code:
    RewriteEngine On
    RewriteBase /
    # Don't rewrite any URIs ending with a file extension (ending with .[xxxxx])
    RewriteCond %{REQUEST_URI} !\.[a-z]{2,5}$ [NC]
    # Don't rewrite admin directory
    RewriteCond %{REQUEST_URI} !^/sysop [NC]
    # Don't rewrite editors directory
    RewriteCond %{REQUEST_URI} !^/editors [NC]
    # Don't rewrite cPanel directories
    RewriteCond %{REQUEST_URI} !/cpanel [NC]
    RewriteCond %{REQUEST_URI} !/frontend [NC]
    # Don't rewrite blog directory
    RewriteCond %{REQUEST_URI} !^/blog-backend [NC]
    
    # Handle all other URIs using Zen Cart (index.php)
    RewriteRule .* index.php?%{QUERY_STRING} [L]
    
    # Rewrite blog directory to display WP inside zencart, but exclude the blog-backend directory because that's my actual WP directory
    RewriteCond %{REQUEST_URI} !^/blog-backend [NC]
    RewriteRule ^blog(.*)$ index.php?main_page=blog$1 [E=VAR1:$1,QSA,L]
    ~Melanie
    PRO-Webs, Inc. :: Recent Zen Cart Projects :: Zen Cart SEO – 12 Steps to Success
    **I answer questions in the forum, private messages are NOT answered. You are welcome to contact us via our website for professional engagements.

 

 

Similar Threads

  1. wordpress template html_header.php blocking modules/pages/index?
    By ZeroGravity in forum All Other Contributions/Addons
    Replies: 11
    Last Post: 6 Jan 2012, 01:27 AM
  2. Format problem with Custom/index.php
    By candyt3 in forum Templates, Stylesheets, Page Layout
    Replies: 11
    Last Post: 24 Nov 2009, 04:04 PM
  3. Problem with index.php
    By cnegfx in forum General Questions
    Replies: 2
    Last Post: 30 Apr 2007, 05:13 PM
  4. wordpress add-on, posts not showing up on index.php
    By joshuaself in forum All Other Contributions/Addons
    Replies: 8
    Last Post: 25 Oct 2006, 07:22 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR