vajdaszabi — 2012-05-30T14:38:31-04:00 — #1
Hi, I was thinking of rewriting my url-s on my web page using a .htaccess file, using the RewriteRule function, for SEO reasons.
For example, I would rewrite my url-s from domain.com/example.php?id=2 to domain.com/example/2 .
However, I am a bit concerned about the loading speed of my site after using the htaccess file, because I heard that these kind of files really tend to slow down the server... I would probably have around 20-25 rewrite rules altogether.
Thanks a lot
marplo — 2012-05-31T03:36:48-04:00 — #2
My opinion is that the speed will be slow down only with a few milliseconds, and this is not a problem.
If you can have friendly url for seo, it is better to rewrite the url.
scallioxtx — 2012-05-31T05:59:32-04:00 — #3
It has a small impact, but not enough to notice unless you get to a few hundred or even a few thousand rules.
dklynn — 2012-06-03T05:36:44-04:00 — #4
The real power of mod_rewrite is in using the regex engine. That means that your 20 or so redirections would easily be handled by one line of mod_rewrite code (okay, two if you count RewriteEngine on).
If you're not familiar with regular expressions (or mod_rewrite, for that matter), have a look at the tutorial linked in my signature as it's helped many members over the years.