How are flat links discovered by a search engine?
I'm new to mod_rewrite
. And SEO.
I wanted to create a Rewr开发者_如何学GoiteRule
which essentially converts the following request:
http://xyz.com/property/state/city/name/propertyid/
into
http://xyz.com/property/?id=propertyid
This is what I used:
RewriteRule ^property/([^/]+)/([^/]+)/([^/]+)/([1-9][0-9]*)/$ /property/?id=$4 [NC]
As you can see, I don't consider the 3 preceding parameters, the id alone is sufficient to display the right page.
Now what I'm wondering is - how would a search engine know the 'desired' link to the property? In other words, if this page were to be indexed, what link would it have in the search results? (or does this depend on which link I spread around?)
Thanks.
Search engine crawlers can only obtain resources to which they know URLs to. So in order to have some resource crawled, the crawler needs to know its URL. This is primarily done by links on other web pages or by submission.
Now if you’re linking to /property/state/city/name/propertyid/
, crawlers will request that URL. You server will then rewrite that URL internally to /property/?id=propertyid
and return its contents back to the crawler. That’s it.
Unless you’re also linking to /property/?id=propertyid
somewhere, crawlers won’t notice that /property/state/city/name/propertyid/
is actually mapped onto /property/?id=propertyid
.
What search engines will do with the URL and the contents of the resource is a different story.
精彩评论