[Contribution] Ultimate SEO URLs - by Chemo
#21
Posted 18 January 2005, 09:09
Skype: remigioruberto
#22
Posted 18 January 2005, 11:59
Chemo, on Jan 17 2005, 09:01 PM, said:
Run the install script, then configure. Make sure it is the FULL filesystem path beginning with a forward slash and ending with a slash!!
Make sure that you performed the step that adds code to the .htaccess file!
Bobby
I have checked that I have the full filepath to the catalog folder instead of the stock /folder/ in .htaccess, and that the .htaccess file is residing in the catalog directory, but still no joy? Hmmm. Any more ideas would be much appreciated
regards
#23
Posted 18 January 2005, 13:44
clarocque, on Jan 18 2005, 03:22 AM, said:
pauldarthvader, on Jan 18 2005, 03:51 AM, said:
/home/iimdfjwt/cache/seo_english.cache
Otherwise it is interpreted as a relative path...it should be absolute!
Bobby
#24
Posted 18 January 2005, 14:59
Chemo, on Jan 18 2005, 01:44 PM, said:
Your path needs to start with a leading slash like this:
/home/iimdfjwt/cache/seo_english.cache
Otherwise it is interpreted as a relative path...it should be absolute!
Bobby
Hi
Thanks bobby, that seems to have done the trick.
And now i see it working, GREAT CONTRIBUTION, HIGHLY RECOMEND!
See it working here Gadgets UK
Paul
Paul
#25
Posted 18 January 2005, 15:02
Try turnng on the rewrite option and then clear all your cache files...it gets even better!
Bobby
#26
Posted 18 January 2005, 15:05
I just installed Ultimate SEO URLs. Its the best contribution that I have installed & the documentation is excellent.
But, I have a small problem. Results returned by the advanced search function are not rewritten, breadcrumbs links on product pages arrived at through the advanced search results also not rewritten.
You can try it here: www.apexdog.com
Server info (Apache on *NIX machine, etc)
Linux 2.4.21-27.0.1.ELsmp
MySQL 4.0.22-standard
4.3.10 (Zend: 1.3.0)
Apache 1.3.33
Exact problem
Described above
What you've tried to solve it
Make this post
...and any debuggin you've done
None, don't know where to start
#27
Posted 18 January 2005, 15:17
It can be fixed but adds a layer of complexity to the contribution. See, other SEO URL contributions try to rewrite EVERYTHING for the store. I took a simple approach and only selected the URLs for index.php (categories) and product_info.php (products).
IMO, SEO URLs are for search engines / spiders as priority #1. They are also nice for customers for easy to remember addresses but that is an arguable point as to whether they will use them to come back (versus hitting you main domain and working back through).
So, my contribution only optimizes the URLs that are absolutely essential for search engines (categories and products) and leaves the rest to the customer. You will NOT have a spider go to the advanced search page, enter search criteria, and then hit the submit button. Only customers will do that...
I can add the advanced_search.php URL's to the list of optimized URLs but overall it will make the contribution harder to install (READ: MORE STEPS) and more complex. A general rule is that the more moving parts on something the more places available to break down. I would rather have something that works for its intended purpose without being too bloated, slow, or complex.
As it is coded now the functionality is excellent, the ease of install is allows installation by all level of webmasters/store owners, and also is *almost* bullet proof with stability.
Bobby
#28
Posted 18 January 2005, 15:34
Bean Boy, on Jan 18 2005, 04:59 AM, said:
regards
Sorry, I may have confused you on this.
RE: .htaccess file
# Change "folder" to your catalog directory name
RewriteBase /folder/
change that to just
# Change "folder" to your catalog directory name
RewriteBase /catalog/
Don't put the full path there.
Bobby is saying to use the "full path" in the Admin Configuration screen for the SEO URL's.
Paul
Edited by Fourbit, 18 January 2005, 15:36.
#29
Posted 18 January 2005, 15:46
i have a little prob with this contrib.
i can´t set
Use search-engine urls
to false (second shop, same database)
if i dont set the Use search-engine url to false, i dont get products in my shopping cart
message:
the requested url was not found
thx for your help
mike
#30
Posted 18 January 2005, 15:57
define('SEARCH_ENGINE_FRIENDLY_URLS', 'false');
The thing to remember is that something can only be defined once. So, when the configuration for that store is pulled and it tries to define it as true it will be disregarded as it is already defined (can't change a defined value).That will turn off SEF URLs for the shop and leave the other store with the value true.
Bobby
#31
Posted 18 January 2005, 16:44
very simple idea - i think to complicated - many thx
#32
Posted 18 January 2005, 17:17
Fourbit, on Jan 18 2005, 04:34 PM, said:
RE: .htaccess file
# Change "folder" to your catalog directory name
RewriteBase /folder/
change that to just
# Change "folder" to your catalog directory name
RewriteBase /catalog/
Don't put the full path there.
Bobby is saying to use the "full path" in the Admin Configuration screen for the SEO URL's.
Paul
hi, this is how the addition to .htaccess in catalog now looks. This has not made any difference to the problem. That is there are 404 error pages when you click on any category from the home page of the catalog.
RewriteBase /catalog/
RewriteRule ^(.*)-p-(.*).html$ product_info.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING}
I can confirm that the cache file has filled with categories and products, and that the URL appears to be correct according to the naming protocol. Because the URL is correct, I assume the rewrite rule to be working OK.
The problem then is in converting the rewritten URL back to the Cid and Pid to call the correct page. How does this work and what can I check?
Thanks again
#33
Posted 18 January 2005, 17:20
RewriteEngine On
RewriteBase /catalog/
RewriteRule ^(.*)-p-(.*).html$ product_info.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING}
Notice you need to have the RewriteEngine On before the others...Bobby
#34
Posted 18 January 2005, 17:26
I also have this site map contribution installed http://www.oscommerce.com/community/contributions,1529
The links in that site map are not rewritten either. I am willing to hack away at it to get the SEF urls in the site map, but I don't have much php experience so I need someone to point me in the right direction.
My thoughs are to leave most of the site map code as is, but instead of displaying the product name & model with Link, put that all into a variable or array so it can be reformatted & displayed with a SEF link.
This is the code that displays the link in the site map contribution.
// display the product model and name with link (including language):
echo "<td class=main>" . $products['products_model'] . "</td><td class=main>\n<a href=\"" . tep_href_link(FILENAME_PRODUCT_INFO, 'name=' .str_replace("/", "/", rawurlencode($prod_name['products_name'])). '&products_id=' . $prod_name['products_id'] . '&language=' . $this_language_code, 'NONSSL', true) . "\">" . $prod_name['products_name'] . "</a></tr>";
#35
Posted 18 January 2005, 17:36
Chemo, on Jan 18 2005, 06:20 PM, said:
RewriteEngine On
RewriteBase /catalog/
RewriteRule ^(.*)-p-(.*).html$ product_info.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING}
Notice you need to have the RewriteEngine On before the others...Bobby
Ouch! How Embarrasing!!
I missed the 1st line of code in the copy and paste exercise.
Thank you very much for your help. This is now up and running fine! great Contribution.
#36
Posted 19 January 2005, 00:15
Thanks for the excellent contribution.
Got a couple of gremlins I hope someone can help iron out.
I tried the earlier cnames version and it worked a treat.
Tried the new version and only problem is, it appears to work exactly the same.
To clarify...
Everything appears to be installed fine. Got the install page to run etc.
Everything is great except, I was keen to try the "Rewrite" option.
Problem is, when I switch it on, it does not appear to make any difference. It operates (generates links) exactly the same as the cname option.
I've wiped the contents of the cache directory. And retested, and the result is the same. Works perfectly, but only as cname regardless of setting chsen from Admin.
I've updated my .htaccess file (in the catalog directory), including changing '/folder/' to '/cat/'
Any suggestions ?
One point worth mentioning, I can't specify an apsolute path to the cache directory in the config.
It fails with can't find...
I enter '/public_html/cat/spcache/' which is the full path, but it fails miserably.
However, if I enter '../cat/spcache' it works. (but without rewrite functionality)
It is runninbg on a linux box.
details below :
Quote
Server Name Apache version 1.3.33 (Unix)
PERL version 5.8.3
PHP version 4.3.10
MySQL version 4.0.22-standard
Thanks,
Zuber
#37
Posted 19 January 2005, 00:37
you can take a look at www.shirtpocket.co.uk
#38
Posted 19 January 2005, 01:02
Your path is not configured correctly. A quick way of getting your full path is to create a phpinfo page.
I can tell that your path is not the FULL path.
You can contact me on AIM or MSN messenger for support on this...
Bobby
#39
Posted 19 January 2005, 07:26
I found a bit of an issue.
Seems that the products don't get added to the cache file if you use EasyPopulate to upload your new products.
For now, I just deleted the cache file and reloaded. Everything is fine. Maybe the delete file should be added to the EP program?
THat's it for tonight. THis old guy needs some sleep.
Paul
#40
Posted 19 January 2005, 07:29
Bobby














