WordPress has been installed as a blog into osCommerce. I’m trying to get the WordPress RSS feed to work. All WP core files exist, but I get all kinds of errors accessing the feed at mydomain.com/wordpress/feed/, like 404s, “the feed can’t be updated because the source file is no longer available,” or even raw php code in the browser from the osCommerce feed file.
I think the problem is the rewrite rules for osCommerce, and I’m thinking if I can exclude the WP feed URL from rewrite, it will fix the feed or help find the real issue.
Looking around SO, I found a solution to use the “last” flag on a URL to prevent it from being rewritten. Problem is, the existing .htaccess already has a rule with a “last” flag on it.
Is there a way to not rewrite the WP feed URL? Can another “last” rule be added? I’d like to have some definite things to try before messing with .htaccess to avoid disrupting the site.
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ http://www.mydomain.com/index.php?cPath=$1 [L]
RewriteRule ^(.*)-p-([0-9]+).html$ product_info.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-c-([0-9]+).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 ^(.*)-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 ^(.*)-t-([0-9_]+).html$ articles.php?tPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-au-([0-9]+).html$ articles.php?authors_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-a-([0-9]+).html$ article_info.php?articles_id=$2&%{QUERY_STRING}
# Information pages
RewriteRule ^(.*)-i-([0-9]+).html$ information.php?info_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-links-([0-9_]+).html$ links.php?lPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-n-([0-9]+).html$ newsdesk_info.php?newsdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-nc-([0-9]+).html$ newsdesk_index.php?newsPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-nri-([0-9]+).html$ newsdesk_reviews_info.php?newsdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-nra-([0-9]+).html$ newsdesk_reviews_article.php?newsdesk_id=$2&%{QUERY_STRING}
I recommend to use two .htaccess files: one in your wordpress directory which catches all requests which should be handled by WordPress and one in your root directory for the rest.
Iâm not so sure about the
%{QUERY_STRING}
in your rewrite rules ⦠test it thoroughly. Also, I donât have any experience with Magento. The last time I tested it, it was way too slow. 🙂As a start, here are the two .htaccess files:
/wordpress/.htaccess
root /.htaccess
Your web hoster has a very informative RewriteLog, which may help if you still have any problems.