Hi all, Thanks for the information everyone has shared in this forum!! I'm not completely sure what questions to ask here so I was wondering if a few people familiar with mod_rewrite could take a look at the recipe section of my site @ http://www.egourmetstore.com . The entire recipe section is done dynamically with PHP. Was wondering if I would benefit from using mod_rewrite and if so would I use two different rules (1) one to rewrite the url to the recipe category and (2) one to rewite the url to the recipe it self? thanks all, Mike
Hiya Mike, I checked out your site and yes, the recipes section could certainly benefit from mod_rewrite. Rewriting the recipe category is trivial; however, in order to be able to easily rewrite the recipe itself, you'll need to first change the recipe lookup from using the recipe ID to using the recipe title, as follows. Instead of: http://egourmetstore.com/gourmet/cookbook/viewrecipe.php?id=152&category=Turkey ...do this: http://egourmetstore.com/gourmet/co...ory=Turkey&title=Apple+Cinnamon+Glazed+Turkey After that, the necessary rewrite rules are not going to be difficult and will let you have URLs of the form: http://egourmetstore.com/gourmet/cookbook/recipes/Turkey/Apple+Cinnamon+Glazed+Turkey/ ...which will certainly help your search engine friendliness.
Hi Willy, Thanks for looking at my site and providing feed back. Sounds like I should start with mod_rewrite of the categories and then plan an approach for the actual recipe pages. I wonder..is there any chance the search engine bots/spiders could follow my dynamic links....or is that too much to hope for. Thanks again, Mike
Quick question for anyone who may be viewing. If I use mod_rewrite to change a url, should that change be refected in the address bar? Or will the original url be there? thanks, Mike
Thanks dct - if I'm using mod_rewrite to change a dynamic url to a static url...is there anyway for me to verify it actually changed since the content will be the same. Wonder if its logged somewhere? I suppose I could temporarily modify the page to echo the url. anyone have ideas? Thanks, Mike