Forum Moderators: coopster
1. Getting rid of all the _id tags in the URLs, so product_id=1000 becomes product=100
2. Change the "?" to "/" so www.example.com/store?product_id=1000 becomes www.example.com/store/~product=1000
3. Using the apache mod rewrite to change the URLs, so that I get URLs like: www.example.com/store/product/1000
4. Creating a static HTML map that points to all the dynamic URLs on my site
5. Creating a static HTML *version* of every dynamic page on my site
Someone has suggested each of the 5 steps before. As you can tell, each step becomes a little more work, and #5 will require some real programming. Does anyone know which of these are necessary?
[edited by: pageoneresults at 5:03 pm (utc) on July 5, 2004]
[edit reason] Examplified and Delinked URI References (mysite.com) [/edit]
The .htaccess is fairly simple too. Just go through your cart script and find the parts where URLs are written and alter the code to have it write them in the new form(/store/1000).
Then, your .htaccess would be like this:
RewriteEngine on
RewriteRule ^store/(.*)$ store.php?product_id=$1 [L]
Assuming the PHP script is named /store.php
Having a large number of static pages, perhaps with 10 products per page and links to the dynamic pages, would help. It shouldn't be too difficult to do with an access or even excel data base and program to generate the pages for upload.
[mystore.com...]
So that the search engines can find it? Meaning, should it be that way from the home page all the way down?
Thanks,
Si
In other words, make sure there are no dynamic links(store?product_id=1000) left on the site. That will further confuse the crawlers.
Just in case you are not clear about the mod_rewrite solution. The mod_rewrite rules DO NOT make the URLs SE friendly, they rewrite friendly URLs back into their original form(/store.php?...). This way the scripts will work as usual.
Would you also say that it is no longer necessary to generate and store static HTML copies of your dynamic pages on the server?
Or is it a "can't hurt" kind of a thing to do?
(I know others have recommended this from time to time)
Thanks!
One thing I noticed is that mod rewrite changes the URL shown on the browser, so if you start with
[mysite.com...]
The browser will eventually display:
[mysite.com...]
Is there anyway to control mod rewrite so that the URL shown in browser does not change?
Thanks!
Si Chen