You are here:  » URL rewriting PriceTapestry in combination with Wordpress

Support Forum



URL rewriting PriceTapestry in combination with Wordpress

Submitted by ghovens on Fri, 2010-08-06 09:50 in

Hi,

I have a wordpress site at {link saved} and want to runn a PriceTapestry install at {link saved}

I have it both running now but I cannot seem to get the URL rewriting right for both the wordpress install and PriceTapestry. Any help is appreciated.

This is the .htaccess file. As you can see I have been trying some different options but nothing seems to work.

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

#RewriteEngine On
#RewriteBase /prijsvergelijk/
RewriteRule ^/prijsvergelijk/product/(.*).html$ /prijsvergelijk/products.php?q=$1&rewrite=1&%{QUERY_STRING} [L]
RewriteRule ^/prijsvergelijk/review/(.*).html$ /prijsvergelijk/reviews.php?q=$1&rewrite=1&%{QUERY_STRING} [L]
RewriteRule ^/prijsvergelijk/merchant/$ merchants.php
RewriteRule ^/prijsvergelijk/merchant/(.*)/$ /prijsvergelijk/search.php?q=merchant:$1:&rewrite=1&%{QUERY_STRING} [L]
RewriteRule ^/prijsvergelijk/merchant/(.*)/(.*).html$ /prijsvergelijk/search.php?q=merchant:$1:&page=$2&rewrite=1&%{QUERY_STRING} [L]
RewriteRule ^/prijsvergelijk/category/$ categories.php
RewriteRule ^/prijsvergelijk/category/(.*)/$ /prijsvergelijk/search.php?q=category:$1:&rewrite=1&%{QUERY_STRING} [L]
RewriteRule ^/prijsvergelijk/category/(.*)/(.*).html$ /prijsvergelijk/search.php?q=category:$1:&page=$2&rewrite=1&%{QUERY_STRING} [L]
RewriteRule ^/prijsvergelijk/brand/$ brands.php
RewriteRule ^/prijsvergelijk/brand/(.*)/$ /prijsvergelijk/search.php?q=brand:$1:&rewrite=1&%{QUERY_STRING} [L]
RewriteRule ^/prijsvergelijk/brand/(.*)/(.*).html$ /prijsvergelijk/search.php?q=brand:$1:&page=$2&rewrite=1&%{QUERY_STRING} [L]

This is the config.php file:

<?php
  $config_title 
"Site Title";
  
$config_charset "utf-8";
  
$config_baseHREF "/prijsvergelijk/";
  
$config_useRewrite true;
  
$config_useRelated false;
  
$config_useTracking false;
  
$config_useJavaScript false;
  
$config_useInteraction false;
  
$config_currencyHTML "";
  
$config_resultsPerPage 10;
  
$config_databaseServer "localhost";
  
$config_databaseUsername "***";
  
$config_databasePassword "***";
  
$config_databaseName "***";
  
$config_databaseTablePrefix "pt_";
?>

Thanks!

Submitted by support on Fri, 2010-08-06 14:40

Hi,

I notice that in your Price Tapestry .htaccess, RewriteBase is commented out; but this is especially important when Price Tapestry is installed in a sub-directory. I appreciate that you may have tried this already owing to the comment, but could you check it with in place of:

#RewriteEngine On
#RewriteBase /prijsvergelijk/

use:

RewriteEngine On
RewriteBase /prijsvergelijk/

(The RewriteBase value should always match $config_baseHREF in config.php)

Bear in mind that both must go in their own application folders, so you will have

/.htaccess (for WordPress)
and
/prijsvergelijk/.htaccess (for Price Tapestry)

Hope this helps!

Cheers,
David.

Submitted by ghovens on Mon, 2010-08-09 09:34

Hi,

Thanks! Splitting the htaccess over the two directories worked! I didn't know you could have 2 htaccess files in one site.

Gr. Gijs