Jump to content



Latest News: (loading..)

- - - - -

htaccess issue with Wordpress Integration


  • Please log in to reply
4 replies to this topic

#1   cclayton

cclayton
  • Members
  • 141 posts
  • Real Name:Chris C
  • Gender:Male
  • Location:Devon

Posted 20 July 2012 - 03:33 PM

I have an oscommerce store (2.2) am using the SEO function well, I am now adding a Wordpress blog to it under a sub-folder /blog/ and have enabled permalinks and then added in the code advise into the .htaccess file that oscommerce uses and it completely freaks oscommerce out. Anyone able to help me fix this issue?

Thanks!

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

Options +FollowSymLinks
RewriteEngine On
RewriteBase /

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}

RewriteCond %{HTTP_HOST}  !^www\.domain\.com$	   [NC]
RewriteRule ^(.*)		 http://www.domain.com/$1  [L,R]

RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*index\.php\ HTTP/
RewriteRule ^(.*)index\.php$ /$1 [R=301,L]

RewriteBase /blog/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]

ErrorDocument 404 /

Founder & Director at CSC Tours Ltd

#2   Praful Kamble

Praful Kamble
  • Members
  • 264 posts
  • Real Name:Praful
  • Gender:Male
  • Location:Pune, India

Posted 21 July 2012 - 06:49 AM

@cclayton

You will find the .htaccess in the blog folder itself. Do changes in that.

Edited by Praful Kamble, 21 July 2012 - 06:49 AM.

Like post..hit LIKE button.

osCommerce | Joomla | WordPress | Magento | SEO | CakePHP | CI

Guaranteed Website Speed Optimization!!

#3   cclayton

cclayton
  • Members
  • 141 posts
  • Real Name:Chris C
  • Gender:Male
  • Location:Devon

Posted 24 July 2012 - 08:59 AM

Thank you so much! I didnt think too create an .htaccess under /blog/, I have done that and added this there and it all works well!
Founder & Director at CSC Tours Ltd

#4 ONLINE   burt

burt

    Code Monkey

  • Community Team
  • 7,724 posts
  • Real Name:G Burton
  • Gender:Male
  • Location:UK/DEV/on

Posted 24 July 2012 - 09:05 AM

Another wordpress <> oscommerce issue:

http://www.clubosc.com/wordpress-and-oscommerce-admin-404.html
eBooks / Templates

Warning: My posts may contain Horsemeat.

#5   Praful Kamble

Praful Kamble
  • Members
  • 264 posts
  • Real Name:Praful
  • Gender:Male
  • Location:Pune, India

Posted 24 July 2012 - 09:20 AM

@cclayton

Gary's blog is very true. As you have set-upped blog in separate directory (/blog/), I don't think you should be bothered. Please do go through this link for basic important security tips for wordpress.
Like post..hit LIKE button.

osCommerce | Joomla | WordPress | Magento | SEO | CakePHP | CI

Guaranteed Website Speed Optimization!!