Jennifer Zelazny

Random and Opinionated Thoughts

Tag: Apache Modules

Apache HOWTOs Web Development

Fun with mod_rewrite

Posted by: Jennifer Zelazny | 0 Comments

Apache’s mod_rewrite is very powerful. You can prevent hot-linking to your site’s graphics to prevent others from stealing them, redirect your from your old URL to a new URL, re-write URLs, as well as about 500 other really cool things…but today I wanted to share the syntax needed to redirect every incoming URL for a particular web site to a specific page. Why? This could come in handy when doing work on a site and you have a “Performing Updates” (in this case index.html) page. You can put the following code in your .htaccess or httpd.conf file: # Enable rewrite... Read More » Read more