Hi,
I was wondering how I could move it pricetapestry one folder up.
I installed it now on a subfolder with a Wordpress installation on top:
http://www.mywebsite.com/pt/
So I get for example: http://www.mywebsite.com/pt/brand/
But what if I want to have it one folder up e.g.
http://www.mywebsite.com/brand/
I guess I should remove the index.php but how should I adjust the config.php and where should I install the pt files?
Yes, Wordpress on top and then the brand, category, merchant part.
So that I have e.g
www.mywebsite.com/brand/pepsi/
www.mywebsite.com/category/toys/
www.mywebsite.com/merchant/wallmart/
Hi Marco,
I think that should work as long as you can get the rules to take effect before anything else. In your top level .htaccess, try adding the following as the first RewriteRules in the file (after any RewriteBase entry)
RewriteRule ^merchant/(.*)/$ pt/search.php?q=merchant:$1:&rewrite=1&%{QUERY_STRING} [L]
RewriteRule ^merchant/(.*)/(.*).html$ pt/search.php?q=merchant:$1:&page=$2&rewrite=1&%{QUERY_STRING} [L]
RewriteRule ^category/(.*)/$ pt/search.php?q=category:$1:&rewrite=1&%{QUERY_STRING} [L]
RewriteRule ^category/(.*)/(.*).html$ pt/search.php?q=category:$1:&page=$2&rewrite=1&%{QUERY_STRING} [L]
RewriteRule ^brand/(.*)/$ pt/search.php?q=brand:$1:&rewrite=1&%{QUERY_STRING} [L]
RewriteRule ^brand/(.*)/(.*).html$ pt/search.php?q=brand:$1:&page=$2&rewrite=1&%{QUERY_STRING} [L]
(in each of the above lines, replace pt/ with whatever your Price Tapestry installation folder is - bear in mind my comment above about using something more meaningful than pt/ as these will be the actual URLs on your website)
With that in place, a common modification to merchants.php, categories.php and brands.php is needed to take account of the changes.
In merchants.php, look for the following code at line 20:
$item["href"] = urlencode(tapestry_hyphenate($product["merchant"]))."/";
...and REPLACE with:
$item["href"] = "/merchant/"
.urlencode(tapestry_hyphenate($product["merchant"]))."/";
...and exactly the same in the other files except using category and brand in place of merchant, and that should do the trick...
Hope this helps!
Cheers,
David.
--
PriceTapestry.com
it works kind of, but I noticed a few things.
a. This link works www.mywebsite.com/merchant/Wallmart/ but if I go to www.mywebsite.com/merchant/ it doesn't show the merchants. It does so on www.mywebsite.com/pt/merchant/ (the same with category and brand).
b. duplicate content: I have two links with same content now www.mywebsite.com/merchant/Wallmart/ and www.mywebsite.com/pt/merchant/Wallmart/. Can there be something done with this?
PS: I changed pt to something else
Hi Marco,
Try adding the following to the top of your top level .htaccess, just before the rules added yesterday:
RewriteRule ^merchant/$ pt/merchants.php&%{QUERY_STRING} [L]
RewriteRule ^category/$ pt/categories.php&rewrite=1&%{QUERY_STRING} [L]
RewriteRule ^brand/$ pt/brands.php&%{QUERY_STRING} [L]
...and remove the equivalent rules in /pt/.htaccess to avoid any duplicate content. Finally, don't forget to update the Merchant, Category and Brand index links in /pt/index.php if required, replace the following code beginning at line 18:
print "<a href='".($config_useRewrite?"merchant/":"merchants.php")."'>".translate("merchant")."</a>, ";
print "<a href='".($config_useRewrite?"category/":"categories.php")."'>".translate("category")."</a> ".translate("or")." ";
print "<a href='".($config_useRewrite?"brand/":"brands.php")."'>".translate("brand")."</a>";
...with:
print "<a href='/merchant/'>".translate("merchant")."</a>, ";
print "<a href='/category/'>".translate("category")."</a> ".translate("or")." ";
print "<a href='/brand/'>".translate("brand")."</a>";
Hope this helps!
Cheers,
David.
--
PriceTapestry.com
Hi,
Best wishes for the New Year.
I added the rewrite rules to the top of my top level .htaccess but it still doesn't show the merchants by just going to www.mywebsite.com/merchant/. It does so on www.mywebsite.com/pt/merchant/ (the same with category and brand).
And with regard to the equivalent rules in /pt/.htaccess to avoid any duplicate content. So the only line it that is?
Options -MultiViews
Hi Marco,
Can you post the contents of your top level .htaccess so I can see the whole picture - (if I'll remove any URLs before publishing your post) that will help, thanks...
Cheers,
David.
--
PriceTapestry.com
This is the top level .htaccess
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^merchant/$ aanbieding/merchants.php&%{QUERY_STRING} [L]
RewriteRule ^category/$ aanbieding/categories.php&rewrite=1&%{QUERY_STRING} [L]
RewriteRule ^brand/$ aanbieding/brands.php&%{QUERY_STRING} [L]
RewriteRule ^merchant/(.*)/$ aanbieding/search.php?q=merchant:$1:&rewrite=1&%{QUERY_STRING} [L]
RewriteRule ^merchant/(.*)/(.*).html$ aanbieding/search.php?q=merchant:$1:&page=$2&rewrite=1&%{QUERY_STRING} [L]
RewriteRule ^category/(.*)/$ aanbieding/search.php?q=category:$1:&rewrite=1&%{QUERY_STRING} [L]
RewriteRule ^category/(.*)/(.*).html$ aanbieding/search.php?q=category:$1:&page=$2&rewrite=1&%{QUERY_STRING} [L]
RewriteRule ^brand/(.*)/$ aanbieding/search.php?q=brand:$1:&rewrite=1&%{QUERY_STRING} [L]
RewriteRule ^brand/(.*)/(.*).html$ aanbieding/search.php?q=brand:$1:&page=$2&rewrite=1&%{QUERY_STRING} [L]
RewriteRule ^index\.php$ - [L]
# uploaded files
RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule . index.php [L]
# END WordPress
And this is the htaccess in the pricetapestry folder:
Options -MultiViews
RewriteEngine On
RewriteBase /aanbieding/
RewriteRule ^product/(.*).html$ products.php?q=$1&rewrite=1&%{QUERY_STRING} [L]
RewriteRule ^review/(.*).html$ reviews.php?q=$1&rewrite=1&%{QUERY_STRING} [L]
RewriteRule ^merchant/$ merchants.php
RewriteRule ^merchant/(.*)/$ search.php?q=merchant:$1:&rewrite=1&%{QUERY_STRING} [L]
RewriteRule ^merchant/(.*)/(.*).html$ search.php?q=merchant:$1:&page=$2&rewrite=1&%{QUERY_STRING} [L]
RewriteRule ^category/$ categories.php
RewriteRule ^category/(.*)/$ search.php?q=category:$1:&rewrite=1&%{QUERY_STRING} [L]
RewriteRule ^category/(.*)/(.*).html$ search.php?q=category:$1:&page=$2&rewrite=1&%{QUERY_STRING} [L]
RewriteRule ^brand/$ brands.php
RewriteRule ^brand/(.*)/$ search.php?q=brand:$1:&rewrite=1&%{QUERY_STRING} [L]
RewriteRule ^brand/(.*)/(.*).html$ search.php?q=brand:$1:&page=$2&rewrite=1&%{QUERY_STRING} [L]
Hi Marco,
That looks fine actually.
What happens when you browse to /merchant/?
Does Wordpress try to display the page, or do you get a web server error e.g. 404 or other message?
Cheers,
David.
--
PriceTapestry.com
I get the 404 page from Wordpress.
This is the url where you can see this:
{link saved}
Hi Marco,
I spotted a mistake in the first 3 rules - sorry about that, have a go with:
RewriteRule ^merchant/$ aanbieding/merchants.php [L]
RewriteRule ^category/$ aanbieding/categories.php [L]
RewriteRule ^brand/$ aanbieding/brands.php [L]
Cheers,
David.
--
PriceTapestry.com
Hi,
This url is get the 404 error:
{link saved}
I noticed that this is working:
{link saved}
{link saved}
If I type it without a slash (e.g. http://www.example.com/category or http://www.example.com/brand) I get a 404 error.
Hi Marco,
The URLs are designed to end in / so if www.example.com/category/ is now working at the top level, and displaying results that should be fine - make sure that any links you make to the indexes are to /category/ (and the same for brand and merchant) and that should be all you need to do now...
Cheers,
David.
--
PriceTapestry.com
I get the / part, but the {link saved} is still returning a 404?
Hi Marco,
That's strange as I see that /category/ and /brand/ are working fine, and also /aanbieding/merchants.php is there - can you double check the first 3 rules in your top level .htaccess are:
RewriteRule ^merchant/$ aanbieding/merchants.php [L]
RewriteRule ^category/$ aanbieding/categories.php [L]
RewriteRule ^brand/$ aanbieding/brands.php [L]
Cheers,
David.
--
PriceTapestry.com
forget the space before the [L]
So this works, but I'm now looking at the htaccess of the pricetapestry folder to avoid any duplicate content. But what lines should I remove/change?
Options -MultiViews
RewriteEngine On
RewriteBase /aanbieding/
RewriteRule ^product/(.*).html$ products.php?q=$1&rewrite=1&%{QUERY_STRING} [L]
RewriteRule ^review/(.*).html$ reviews.php?q=$1&rewrite=1&%{QUERY_STRING} [L]
RewriteRule ^merchant/$ merchants.php
RewriteRule ^merchant/(.*)/$ search.php?q=merchant:$1:&rewrite=1&%{QUERY_STRING} [L]
RewriteRule ^merchant/(.*)/(.*).html$ search.php?q=merchant:$1:&page=$2&rewrite=1&%{QUERY_STRING} [L]
RewriteRule ^category/$ categories.php
RewriteRule ^category/(.*)/$ search.php?q=category:$1:&rewrite=1&%{QUERY_STRING} [L]
RewriteRule ^category/(.*)/(.*).html$ search.php?q=category:$1:&page=$2&rewrite=1&%{QUERY_STRING} [L]
RewriteRule ^brand/$ brands.php
RewriteRule ^brand/(.*)/$ search.php?q=brand:$1:&rewrite=1&%{QUERY_STRING} [L]
RewriteRule ^brand/(.*)/(.*).html$ search.php?q=brand:$1:&page=$2&rewrite=1&%{QUERY_STRING} [L]
Hi Marco,
You can remove all the merchant/category/brand rules now and edit it right down to just
Options -MultiViews
RewriteEngine On
RewriteBase /aanbieding/
RewriteRule ^product/(.*).html$ products.php?q=$1&rewrite=1&%{QUERY_STRING} [L]
RewriteRule ^review/(.*).html$ reviews.php?q=$1&rewrite=1&%{QUERY_STRING} [L]
Make sure that any links to the merchant, category and brand index generated elsewhere in your /aanbieding/ template are adjusted to the top level version; and don't forget the merchant link in the price comparison table which is actually generated in products.php around line 22:
$rows[$k]["merchantHREF"] = $config_baseHREF."merchant/".tapestry_hyphenate($row["merchant"])."/";
...and REPLACE with just:
$rows[$k]["merchantHREF"] = "/merchant/".tapestry_hyphenate($row["merchant"])."/";
Cheers,
David.
--
PriceTapestry.com
I couldn't find the line:
$rows[$k]["merchantHREF"] = $config_baseHREF."merchant/".tapestry_hyphenate($row["merchant"])."/";
but on row 29 I found:
$rows[$k]["merchantHREF"] = $config_baseHREF."merchant/".urlencode(tapestry_hyphenate($row["merchant"]))."/";
Do you mean that? And how can I check if it works?
Hi Marco,
That's the one - change line 29 then to:
$rows[$k]["merchantHREF"] = "/merchant/".urlencode(tapestry_hyphenate($row["merchant"]))."/";
Then to test, browse to a product page, and in the Stockist column in the price comparison table, click the merchant name and it should take you to your top level version of the search results for that merchant...
Cheers,
David.
--
PriceTapestry.com
Hi,
Noticed that the top level htaccesss RewriteRule ^category/$ aanbieding/categories.php [L] interferes with Wordpress.
Wordpress has category pages e.g. www.mywordpresssite.com/category/news/
But with the current rewrite rule it doesn't get displayed. Instead of it goes to Pricetapestry.
How can I workaround this?
Hi Marco,
What you need to decide is which you would rather give /category/ priority to (assuming that you can change /category/ to something else within Wordpress - I'm not sure about that). You certainly can within your top level rewrites to Price Tapestry - changing the rule to, for example:
RewriteRule ^product-category/$ aanbieding/categories.php [L]
...would do the trick, combined with the appropriate changes within Price Tapestry to replace any existing links to /category/ to /product-category/ (or whatever alternative you choose), as described in this post above...
Cheers,
David.
--
PriceTapestry.com
Hi Dave,
One step further to my ultimate setup, but keep getting new questions.
I changed the category in PriceTapestry as Wordpress widgets and plugins also have references to the category pages. The rewrite did the trick.
But in my ultimate setup I want to use multiple wordpress sites and price tapestry installations (using a multisite wordpress setup on top and in different folders several price tapestry installations).
Let's say I have two domains and want to have two seperate price tapestry installations under it:
a. www.domain1.com
b. www.domain2.com
c. /pricetapestry1/
d. /pricetapestry2/
So I want to have www.domain1.com/pricetapestry1/ and www.domain2.com/pricetapestry2/
I tried unsuccesfully to set the rewrite rule in the top level htaccess to
RewriteRule ^www.domain1.com/merchant/$ pricetapestry1/merchants.php [L]
Do you also have any suggestions for this?
Hi Marco,
RewriteRules match against the REQUEST_URI which codes not contain the host name, so assuming that www.domain1.com and www.domain2.com are different physical installations then of course you can just use the appropriate rewrites in each case, e.g.
www.domain1.com/.htaccess:
RewriteRule ^merchant/$ pricetapestry1/merchants.php [L]
www.domain2.com/.htaccess:
RewriteRule ^merchant/$ pricetapestry2/merchants.php [L]
However, if you've got it set-up so that domain1.com and domain2.com are actually being served by the same physical folder, then you can use RewriteCond to match each host individual and use the appropriate rule, e.g.
RewriteCond %{HTTP_HOST} ^www\.domain1\.com [NC]
RewriteRule ^merchant/$ pricetapestry1/merchants.php [L]
RewriteCond %{HTTP_HOST} ^www\.domain2\.com [NC]
RewriteRule ^merchant/$ pricetapestry2/merchants.php [L]
Note that RewriteCond only applies to the next RewriteRule, so you will have to copy the same RewriteCond and paste it immediately before every pricetapestry1/ and pricetapestry2/ rule in the file.
Also note that the match requires www. to be in your host name. In theory the RewriteCond could be modified to match either domain1.com or www.domain1.com, but since it is good practice to make sure that your website is only served from one version of the hostname, if you're not already I would use this in conjunction with something like this at the very top of your .htaccess:
RewriteCond %{HTTP_HOST} ^domain1\.com [NC]
RewriteRule ^(.*) http://www.domain1.com/$1 [L,R=301]
RewriteCond %{HTTP_HOST} ^domain2\.com [NC]
RewriteRule ^(.*) http://www.domain2.com/$1 [L,R=301]
Cheers,
David.
--
PriceTapestry.com
I set-up it so that domain1.com and domain2.com are actually being served by the same physical folder. The RewriteCond works, but I noticed that the product url aren't working.
Examples can be found on this page:
{link saved}
You'll see the url doesn't go anywhere:
{link saved}
Hi Marco,
That looks like the appropriate RewriteCond isn't in place for the /product/ rules -could you double check that you now have, e.g.
RewriteCond %{HTTP_HOST} ^www\.domain1\.com [NC]
RewriteRule ^product/(.*).html$ aanbieding1/products.php?q=$1&rewrite=1&%{QUERY_STRING} [L]
RewriteCond %{HTTP_HOST} ^www\.domain2\.com [NC]
RewriteRule ^product/(.*).html$ aanbieding2/products.php?q=$1&rewrite=1&%{QUERY_STRING} [L]
(where aanbieding1 and aanbieding2 are your separate installations relating to domain1.com and domain2.com)
That should be all it is - they work in exactly the same way as the /categorie/ rewrite which appears to be working; but if still no joy if you could post the relevant section of your .htaccess I'll look into it further...
Cheers,
David.
--
PriceTapestry.com
Hi,
I did something differently. I noticed that I had the products.php missing on my folder. So then I put the same lines in for product as with the merchant, categorie and brand. It seems to work.
I also tried to remove this line from the pricetapestry htaccess to avoid duplicates and to skip the pt folder name:
RewriteRule ^product/(.*).html$ products.php?q=$1&rewrite=1&%{QUERY_STRING} [L]
But then it it didn't show the products anymore.
Is there a way to skip the aanbieding in the http://www.domain1.com/aanbieding/product/A-Solar-AM101-Power-Charger.html ?
This is the rewrite section in the top level htaccess:
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.domain1\.com [NC]
RewriteRule ^merchant/$ aanbieding/merchants.php [L]
RewriteCond %{HTTP_HOST} ^www\.domain1\.com [NC]
RewriteRule ^categorie/$ aanbieding/categories.php [L]
RewriteCond %{HTTP_HOST} ^www\.domain1\.com [NC]
RewriteRule ^brand/$ aanbieding/brands.php [L]
RewriteCond %{HTTP_HOST} ^www\.domain1\.com [NC]
RewriteRule ^product/$ aanbieding/products.php [L]
RewriteCond %{HTTP_HOST} ^www\.domain1\.com [NC]
RewriteRule ^merchant/(.*)/$ aanbieding/search.php?q=merchant:$1:&rewrite=1&%{QUERY_STRING} [L]
RewriteCond %{HTTP_HOST} ^www\.domain1\.com [NC]
RewriteRule ^merchant/(.*)/(.*).html$ aanbieding/search.php?q=merchant:$1:&page=$2&rewrite=1&%{QUERY_STRING} [L]
RewriteCond %{HTTP_HOST} ^www\.domain1\.com [NC]
RewriteRule ^categorie/(.*)/$ aanbieding/search.php?q=category:$1:&rewrite=1&%{QUERY_STRING} [L]
RewriteCond %{HTTP_HOST} ^www\.domain1\.com [NC]
RewriteRule ^categorie/(.*)/(.*).html$ aanbieding/search.php?q=category:$1:&page=$2&rewrite=1&%{QUERY_STRING} [L]
RewriteCond %{HTTP_HOST} ^www\.domain1\.com [NC]
RewriteRule ^brand/(.*)/$ aanbieding/search.php?q=brand:$1:&rewrite=1&%{QUERY_STRING} [L]
RewriteCond %{HTTP_HOST} ^www\.domain1\.com [NC]
RewriteRule ^brand/(.*)/(.*).html$ aanbieding/search.php?q=brand:$1:&page=$2&rewrite=1&%{QUERY_STRING} [L]
RewriteCond %{HTTP_HOST} ^www\.domain1\.com [NC]
RewriteRule ^product/(.*)/$ aanbieding/search.php?q=product:$1:&rewrite=1&%{QUERY_STRING} [L]
RewriteCond %{HTTP_HOST} ^www\.domain1\.com [NC]
RewriteRule ^product/(.*)/(.*).html$ aanbieding/search.php?q=product:$1:&page=$2&rewrite=1&%{QUERY_STRING} [L]
RewriteRule ^index\.php$ - [L]
This is the content of the pricetapestry htaccess:
Options -MultiViews
RewriteEngine On
RewriteBase /aanbieding/
RewriteRule ^product/(.*).html$ products.php?q=$1&rewrite=1&%{QUERY_STRING} [L]
RewriteRule ^review/(.*).html$ reviews.php?q=$1&rewrite=1&%{QUERY_STRING} [L]
Hi Marco,
Very close - you need to rewrite /product/ to products.php instead of search.php. In place of:
RewriteCond %{HTTP_HOST} ^www\.domain1\.com [NC]
RewriteRule ^product/(.*)/$ aanbieding/search.php?q=product:$1:&rewrite=1&%{QUERY_STRING} [L]
RewriteCond %{HTTP_HOST} ^www\.domain1\.com [NC]
RewriteRule ^product/(.*)/(.*).html$ aanbieding/search.php?q=product:$1:&page=$2&rewrite=1&%{QUERY_STRING} [L]
...try just:
RewriteCond %{HTTP_HOST} ^www\.domain1\.com [NC]
RewriteRule ^product/(.*)/$ aanbieding/products.php?q=$1&%{QUERY_STRING} [L]
(no need for the second rule as there are no additional pages on products.php)
Cheers,
David.
--
PriceTapestry.com
Didn't work. The product url still has the pricetapestry foldername in it.
Hi Marco,
Sorry, I had got the rule incorrect - it should be:
RewriteCond %{HTTP_HOST} ^www\.domain1\.com [NC]
RewriteRule ^product/(.*).html$ aanbieding/products.php?q=$1&%{QUERY_STRING} [L]
However, the code will still need to be changed to remove the Price Tapestry folder name ($config_baseHREF) from product links. These exist as follows:
index.php (featured products)
Line 63:
$featured["products"][$k]["productHREF"] = $config_baseHREF."product/".tapestry_hyphenate($product["normalised_name"]).".html";
$featured["products"][$k]["productHREF"] = "/product/" .tapestry_hyphenate($product["normalised_name"]).".html";
search.php (search results)
Line 272:
$searchresults["products"][$k]["productHREF"] = $config_baseHREF."product/".tapestry_hyphenate($product["normalised_name"]).".html";
$searchresults["products"][$k]["productHREF"] = "/product/" .tapestry_hyphenate($product["normalised_name"]).".html";
products.php (related products)
Line 89:
$searchresults["products"][$k]["productHREF"] = $config_baseHREF."product/".tapestry_hyphenate($related["normalised_name"]).".html";
$searchresults["products"][$k]["productHREF"] = "/product/" .tapestry_hyphenate($related["normalised_name"]).".html";
Cheers,
David.
--
PriceTapestry.com
Hi,
Couldn't find the lines in search.php and products.php. I'm using version 12/10Beta
Also I'm using one of Dave's templates.
So on index.php I allready have:
if ($config_useRewrite)
{
$featured["products"][$k]["productHREF"] = "product/".tapestry_hyphenate($product["name"]).".html";
$featured["products"][$k]["reviewHREF"] = "review/".tapestry_hyphenate($product["name"]).".html";
}
else
{
$featured["products"][$k]["productHREF"] = "products.php?q=".urlencode($product["name"]);
$featured["products"][$k]["reviewHREF"] = "reviews.php?q=".urlencode($product["name"]);
Should I change the two lines with "name" to "normalised_name"?
Hi Marco,
In 12/10, the product URL actually comes from a function in includes/tapestry.php - look for the following code at line 53:
return $config_baseHREF."product/".urlencode(tapestry_hyphenate($product["normalised_name"])).".html";
...and REPLACE that with:
return "/product/"
.urlencode(tapestry_hyphenate($product["normalised_name"])).".html";
That covers all instances of the product URL in 12/10Beta/A, however if you still have this line in your index.php
$featured["products"][$k]["productHREF"] = "product/".tapestry_hyphenate($product["name"]).".html";
...then yes, replace name with normalised_name, but also make sure that it begins with "/" to indicate the top level, e.g.
$featured["products"][$k]["productHREF"] = "/product/".
tapestry_hyphenate($product["name"]).".html";
Cheers,
David.
--
PriceTapestry.com
Hi,
It works. I saw more instances of "name" in the Pricetapestry in the index.php and other template files (atoz.php, featured.php, prices.php, product.php, search.php, searchresults.php and searchresultsr.php) .
Is it better to do a search and replace by "normalised_name"?
And I was wondering it I could do something to prevent the following from happening.
I now have two pricetapestry folders above two wordpress websites. But can I make the pricetapestry folder only appear above one of the wordpress folders (while preventing it to interfere with Wordpress)?
Example:
This is okay:
www.wordpress1.com/pricetapestryA/
www.wordpress2.com/pricetapestryB/
This is not okay:
www.wordpress1.com/pricetapestryB/
www.wordpress2.com/pricetapestryA/
But idealy it should still be possible to make a wordpress page with the same name as the 'not shown' pricetapestry foldername. E.g. www.wordpress2.com/pricetapestryA/ should be shown if made as a wordpress page/post with the wordpress content instead of the pricetapestryA content.
Hi Marco,
A search and replace should do the trick, but if you find any pages aren't working let me know the specifics and I'll take a look.
With regards to directing each /pricetapestryA/ and /pricetapestryB/ to the same site - no problem - the above modification described in includes/tapestry.php was simply to make sure that /product/ is at the top level, but you can put the full URL if you wish - the replacement would be:
return "http://www.domain1.com/product/"
.urlencode(tapestry_hyphenate($product["normalised_name"])).".html";
(this is an alternative REPLACEment to the one described in this post)
Cheers,
David.
--
PriceTapestry.com
Hi,
What I was looking for is to prevent that the pricetapestry folders are used by another website to prevent a duplicate content penalty from the search engines.
So currently I have two pricetapestryfolders A and B. And with two websites I have:
1. www.wordpress1.com/pricetapestryA
2. www.wordpress2.com/pricetapestryB
3. www.wordpress1.com/pricetapestryB
4. www.wordpress1.com/pricetapestryA
Every website on top can put one of the two pricetapestry folders after the url. But what if I wanted it to be exclusive for one top website?
Could I put something in the pricetapestry htaccess to make the use exclusive for one specific top level url?
Hi Marco,
Sure - simply use the full URL as the value for $config_baseHREF in config.php (line 6) e.g.
$config_baseHREF = "http://www.wordpress1.com/pricetapestryA/";
Cheers,
David.
--
PriceTapestry.com
Hi,
The content in http://www.wordpress1.com/pricetapestryA/ is now exclusive for Wordpress1 website except the page itself.
When I make a post in Wordpress2 named pricetapestryA it has the Url http://www.wordpress2.com/pricetapestryA/ but this url doesn't show the wordpress content but shows a pricetapestry page (namely the http://www.wordpress1.com/pricetapestryA/ page).
Is there a way to prevent this from happening while being able to make the http://www.wordpress2.com/pricetapestryA/ page in Wordpress? (I'm trying to setup multiple wordpress sites above multiple pricetapestry sites.)
Hi Marco,
I'm not sure that would be possible i'm afraid if you want a Wordpress post with the same title as the folder of a Price Tapestry installation - I would strongly recommend using names for your /pricetapestryA/ /pricetapestryB/ installations that won't ever conflict with Wordpress posts if using clean URLs that are simply /post-title/...
Cheers,
David.
--
PriceTapestry.com
Hi,
I'm working now on the other Prictapestry and made the code changes including the search and replace to "normalised_name".
I noticed that the URL's for merchant, categorie and brand return with empty pages.
These are the URLs:
{links saved}
Hi Marco,
Could you paste the relevant section of your top level .htaccess and I'll take a look...
Cheers,
David.
--
PriceTapestry.com
Hi Marco,
It seems to be an issue in the installation rather than anything to do with the rewrite. Can you email me your merchants.php and html/atoz.php from the /nintendo/ installation and I'll take a look...
(if you notice on the pages, there is the correct number of bullets, and if you view the source the links are there, but the item title is empty...)
Cheers,
David.
--
PriceTapestry.com
Thanks, the html/atoz.php with the $item["normalised_name"] changed back to
$item["name"] works.
Hi,
Noticed that the featured products aren't showing.
I copied the exact producttitles and they do show up in the search, but aren't displayed on:
{link saved}
Examples of the titles included in the featured products are:
10 voor taal NDS
DS Lite Guitar Sensation
Call of Duty Black Ops NDS
Colin McRae Dirt 2
Hi Marco,
I think this might be a similar to the issue you were having in your modified HTML files with atoz.php above - if you could reply to my last email with your index.php and html/featured.php I'll check it out for you...
Cheers,
David.
--
PriceTapestry.com
Thanks I placed the modified index.php (the name field in the
featured products table is name rather than normalised_name, but they
then needs to be normalised to work with the main featured products
SELECT SQL...) and that fixes it.
hi,
I succeeded in setting up the first site (websiteA with Pricetapestry in PTA).
Sn now I tried to setup a second site (websiteB with Pricetapestry in PTC). It gets installed but after the import I tried to check the category page. But this isn't shown
The url is:
{link saved}
Maybe I did something wrong in the htcaccess files?
{code saved}
Hi Marco,
I've looked closely and can't see any differences between the PTA, PTB and PTC sections - if it's still not working do you want to email me your fill .htaccess and I'll take a look...
Cheers,
David.
--
PriceTapestry.com
Thanks, I guess I need new glasses (overlooked the "top level /category/ on its own rewrite is missing for the website")
Hi Marco,
Do you mean that you want to keep Wordpress as your top level site, but when in /pt/ and there is a link to a brand page you want it to appear as /brand/Brand-Name/ instead of /pt/brand/Brand-Name/ ?
(bear in mind it might be worth using a Price Tapestry installation folder that is more appropriate such as /shopping/ or /comparison/ rather than /pt/ which has no SEO value)
Cheers,
David.
--
PriceTapestry.com