homepage Welcome to WebmasterWorld Guest from 23.20.63.27
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
PHP links to HTML links in OsCommerce
Easiest way to trick out the whole package?
physics




msg:1249881
 6:16 pm on Mar 26, 2002 (gmt 0)

Suppose you get an open source php package such as OsCommerce. Everything is PHP and all of the links are php links. Then you want to trick the spiders into seeing .html links everywhere, not foo.php?id=25. This way Googlebot sees nice links and then .htaccess is used to serve him the foo.php?1d=25 page. The problem is that the package is designed to link to foo.php?id=25, but you want all the links to show up as /foo/25.html What is a good way to quickly adapt the whole packages internal linking scheme? If it were this simple (only one url to change) then you could just do a global search and replace on all files in the package I suppose. But it's not so simple because there are a myriad of different pages and query strings. Anyone have advice on how to go about this in the most efficient manner?

Cheers,
physics

 

Crazy_Fool




msg:1249882
 8:51 pm on Mar 26, 2002 (gmt 0)

i'll be looking at doing this with oscommerce in a few weeks time. got to try it out on yabb forums and other things first. have you asked in the oscommerce forums?

gethan




msg:1249883
 10:56 pm on Mar 26, 2002 (gmt 0)

Funnily enough I'm looking at doing essentially the same with a forum as well.

Though I haven't done it yet the approach I'm going to take is

1) Build mod_rewrite rules that do all of the common things like list a forum, view a post. Then I'll test it out with url's that I just type in.

2) Hack the code so that everywhere a url is printed that I've made a mod_rewrite rule for appears, the static looking url is used instead.

3) Test test test ... erm OK - put it live and cross fingers ;)

HTH ... Crazy_fool - let me know how it goes with yabb - I'll be hacking XMB.

Trisha




msg:1249884
 1:43 am on Mar 28, 2002 (gmt 0)

I have used OSCommerce before and am interested in this also. (

I don't have anything to contribute to this thread at this time, but wanted to reply so that I can check the email notification box. I don't know of any other way to be able to be informed about additional replies to the thread. Sorry)

physics




msg:1249885
 7:29 am on Mar 31, 2002 (gmt 0)

I think I may have found some leads while nosing around on the osCommerce email lists online [oscommerce.com]. For preview release 2.2 there is a function called
Use Search Engine Safe URLs
in the configuration section of the online administrative interface (guess what it is supposed to do ;) ). It is under development it says. I'm going to play around with it. There is an active topic about this at the oscommerce forums also, which can be accessed by clicking the link above.

ergophobe




msg:1249886
 6:10 pm on Apr 26, 2002 (gmt 0)

I've used OSC quite a bit and done some significant customizations and would strongly recommend using the version 2.2 development version. In reality, it's better and generally more reliable than version 2.1

Also, the search-engine friendly urls question has come up a million times on the OSC forums. Do a search there and you should have more than you want.

Cheers

Tom

physics




msg:1249887
 6:30 pm on Apr 26, 2002 (gmt 0)

Thanks ergophobe. I've been reading the oscommerce lists too, a very active community! Here is some very specific info for people which wish to custom mod the SE friendly urls. This is done in the following part of the code in 2.2:
<hint>
The code re-writes the url in /includes/functions/html-output.php
Currently in line 54 (or thereabouts)
Also you will have to go to your mySQL database configuration table and
manaully set Search_engine_safe_urls to true if you have not already done
this.
If your apache server does not have the lookback feature it will not work.
</hint>
[this is a snippet from an email from someone in the list... thanks!]

ergophobe, where is your site hosted? Some hosts, such as chainreactionweb.com {i'm not affiliated, just wanted to drop the name in case others have feedback} offer special hosting deals for oscommerce. This seems good to me because then they understand your special needs such as setting the lookback feature on the server so that using the se friendly urls is possible 'out of the box' (or... well they probably will have taken care of it already).

By the way, you should be able to modify that snippet of code and mess with .htaccess to get all sorts of interesting urls :)

ergophobe




msg:1249888
 5:12 pm on Apr 29, 2002 (gmt 0)

>ergophobe, where is your site hosted?

Long story. I started do the OSC mods for someone who then changed management and the new management couldn't figure out what they wanted for a website, so it all has been on hold long enough that I guess it should be considered dead. I set up my test site with www.webgroupmedia.com, but I can't say as I necessarily recommend them. They seem to have followed the typical pattern
small company with great service to => growing company that doesn't answer e-mails and has taken their live help options (chat and telephone) offline.

Basically, though, OSC should run anywhere with PHP, even if PHP is running in safe mode and so on.

Tom

Crazy_Fool




msg:1249889
 9:15 pm on Apr 29, 2002 (gmt 0)

well ... i've set up and modified oscommerce once, and once is enough for me. it's powerful and the intentions are good, but it is has serious flaws that destroy all the benefits.

1 - there is too much code making the sote difficult to modify - there are multiple database queries which are virtually identical, or they would be if they used SELECT * instead of specifying every single field. adding extra fields is difficult

2 - the design of the code is such that the page headers are displayed before the database is queried for content - this means that you cannot have unique titles and meta tags etc on each page - please don't say it can't be done anyway, because it can. all you need to do is do all the database queries before any output.

3 - search engine safe URLs are a waste of time because of the way sessions and cookies have been implemented - search engine spiders dont allow you to set cookies - turn cookies off and you get PHPSESSID in the URL - search engines don't like sessions in URLs. don't say it's impossible to have a cart without sessions in the URL, because it isn't.

4 - by default, the cart requires people to register for an account prior to making any purchase. compulsory registration is very likely to drive away all but the most determined customers - why would they go through the hassle of registering (and it's a lengthy registration) when they can easily go elsewhere and buy without any hassles?

the above are some of the very serious flaws - there are many other smaller flaws, such as the registration form requiring date of birth etc - under UK (and possibly EU) law, that sort of thing is termed "sensitive personal information" and requires site owners to register under the data protection act. i could go on and on and on.

it owuld be far better to use one of the many other free shopping carts out there that can be configured to suit. even if it means you don't have search engine safe URLs, you can't be any worse off than with oscommerce.

physics




msg:1249890
 12:06 am on Apr 30, 2002 (gmt 0)

Thanks for your input Crazy_Fool This is why I'm thinking maybe going with a web host who offers RedHat Interchange as a standard feature might be best.
RedHat Akopia Interchange vs. osCommerce [webmasterworld.com]

p.s. Could you name any of the other good free carts, other than osCommerce and Interchange?

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved