I seem to have done something that has stopped my category links from working.
It is at http://www.findallsorts.com/shopUK/categories.php
I get an error page when I click on a category and I have been making some changes today, but am not sure what I have changed that has caused this error. I havent changed categories.php.
They were working OK before, then I just changed all the categories in the csv file, and tried to put them all in one category, then changed back to the category field, and now they dont work at all.
Hi Clare,
Because you have got $config_useRewrite enabled; the categories page is expecting you to be viewing:
http://www.findallsorts.com/shopUK/category/
instead of:
http://www.findallsorts.com/shopUK/categories.php
The first URL works fine on your server, so if you're happy to use the rewritten version you won't need to change the code at all.
Cheers,
David.
Yes it does, thankyou.
Out of interest, these pages are written on the fly I guess. So are search engine spiders able to follow a link and read the code from a link they follow to a page that gets built on the fly, and doesnt actually exist on the server, such as the www.site.com/category/
Hi Clare,
It's no problem at all - a search engine has no idea that the page is generated "on the fly" - to all intents and purposes it is a static page on your web server.
Cheers,
David.
I am still having a small problem with my category links.
I installed PT in 2 directories, one for USA products and one for UK products. On my home page there is a choice to go to either directory to search.
The UK section is working fine.
But when I go to the USA section
http://www.findallsorts.com/shopUSA/
and click on any of the links to go to the USA search options, even though the links are saying /shopUSA/ I am sent to the shopUK section.
I have looked at my config file and the base is /shopUSA/ , is there another setting somewhere I may have missed?
Have you checked that RewriteBase is correct in both installations? It looks like you may have
RewriteBase /shopUK/
...in your .htaccess file in your /shopUSA/ directory....
Cheers,
David.
I hadnt checked the .htaccess
Now it is working
Thankyou very much
Clare
My site has now developed this problem. If I typed in brands.php, merchants.php or categories.php into my browser it used to list them in A-Z order and if I clicked on the links it would display products.
I have switched mod_rewrite option on and now I just get my 404 error page when I click on the links. I have not changed any paths in the 3 scripts mentioned and my baseHREF in config.php is the root (i.e. /) and I used the supplied .htaccess file so I'm a bit confused what's happened to it.
Hi Jannii,
When using mod_rewrite the brands.php etc. pages (when browsed to directly) will not work as the links they generate are expected to be based on the virtual directory /brands/
Once you have enable mod_rewrite (through $config_useRewrite in config.php) these pages must be accessed through the virtual directories, for example:
http://www.yoursite.com/merchant/
http://www.yoursite.com/brand/
http://www.yoursite.com/category/
Note that the links on the homepage change to reflect this when you enable mod_rewrite.
Hope this helps,
Cheers!
David.
Is it because I have put links to categories.php and the script works from only /category/
As I just looked and from the proper category link http://www.findallsorts.com/category/
The category links work.
So do I need to write the urls for the links to the category pages, the same as they are written elsewhere ie
<?php
print "<a href='".($config_useRewrite?"category/":"categories.php")."'>".translate("CATEGORY")."</a>";
?>