Hi again. The reason I decided to use .htaccess ModReWrite was so that Search Engines would crawl the site properly (Index All Pages). And also make URL’s more friendly for people wanting to remember them.
A web site designer told me today that with PHP, as I am using a single page as a template page for all product pages, search engines will only find and hence only rank one page! I thought that all web pages were designed using the PHP and then Search Engines crawl all pages that result from the PHP code. Can anyone tell me (preferably from experience) whether all pages will be ranked by the likes of Google, Bing, Yahoo…etc…
I want to maintain (if not better) the ranking of the current HTML web site online at the moment.
Complete and utter rubbish. Unless the pages have the exact same content google will rank them as different pages.
There are a gazillion pages out there written in php that are distinguished by big G. That should speak for itself really.
You said above regarding getting rid of the .htm on the URL:
As for the .htm, that’s pretty simple; just create a rule that strips the .htm from the requested URL and 301 redirect
I am redesigning a web site using MySQL and PHP hence why I am going to use a Mod ReWrite. If there are say a thousand pages with DIFFERENT URLs (not just the .htm needs removing) I think you would say I need to Mod Rewrite every link to it’s new link. How would I do this?
I’m using Redirect here instead of RewriteRules because Redirect is a lot faster if you just need to match single instances because it doesn’t use regex but simple string comparisons.
No you can’t do that using mod-rewrite. The problem is that you have “two types of hyphens”. Let me explain
iphone-4-car-charger
The blue hyphens are connectors within terms, while the red hyphen is a seperator between terms. However, all Apache sees is hyphens and it doesn’t know one from the other, so that’s where the ball stops.
You could however pick another separator, like / or _ and use that. That would work.
And Matthew, do me a favor will ya, next time you ask a question please a think a bit longer ~how~ you ask it and be ~specific~! Do not ask how to rewrite A to B when what you really want is to rewrite B to A. All I see here is what you type, not what you were thinking while you were typing.