I am working on building my first search-engine friendly CMS. I know that perhaps one of the biggest keys to having and SEO site is to have search-engine friendly URLs. So having a link like this:
http://www.mysite.com/product/details/page1
will result in much better rankings than one like this:
http://www.mysite.com/index.php?pageID=37
I know that to create URLs like the first one, I have one of two options:
- use a web technology, in this case PHP, to create a directory structure
- leverage Apache's
mod_rewrite
add-on to have these URLs passed to a PHP processor
As far as the PHP goes, I'm pretty comfortable with anything. However, I think the first option would be more difficult to maintain.
Could someone show me how to write an .htaccess
file, which will:
- silently direct SEO URLs to a processor script
- not redirect if the requested URL is an actual directory on the server
Is there a better way than the way I am trying it?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…