I feel a little stupid asking this - like i should be able to find out by googling - but i haven't found any really good, controversial ideas on this topic.
I am thinking about rewriting my URLs from dynamic http://www.example.com/?section=news&news_id=42
to static http://www.example.com/news/42/awesome-news-item-title
- i have already found out how to solve this and like the result a lot. Now, before implementing this on my site, i'd love to have some neutral input on Browser performance.
All the sources i found said static URLs are more SEO-friendly (except for this google webmaster central blogpost) - they sure as hell are more user-friendly regarding readability.
It's only that I had the impression of the website loading waaay longer using the rewrite.
RewriteRule ^news/([0-9]+)(\/[a-z-]+)?$ /index.php?section=news&news_id=$1&title=$2
So, my bunch of questions is:
- How does mod_rewrite affect browser performance?
- Would you rewrite the URLs anyway?
- Is there a better way to do it than the one I used?
- I would go with this answer for url-encoding my news-titles. Agreed? Better suggestions?
- Is there anything I really have to pay attention to? (Apart from checking if the title given in the URL matches the title of my news to avoid things like
http://www.example.com/news/42/example-com-is-stupid
)