Just a quick hints and tips update for today. On a number of my sites I have been using mod_rewrite to produce SEO friendly URLs. e.g. :
mysite.com/widgets/my-big-widget
instead of something like:
mysite.com/index.php?cat=4&function=show&prod=456
This is done using RewriteCond and RewriteRule statements in .htaccess. However, normally RewriteCond only applies to the RewriteRule immediately following it. This means we end up with horrible repetitive blocks of code in our .htaccess files. In this article I’ll show you how to rationalise this problem and shorten your code! Read More…