Mod Rewrite Generator

23 Apr 2008 In: Apache Useful Links

Please refer to http://www.thetoptopsites.com/tools/modrgen/

mod rewrite

22 Apr 2008 In: Apache Useful Links

mod_rewrite is just possibly one of the most useful Apache modules and features. The ability to rewrite requests internally as well as externally is extremely powerful.


.htaccess rewrite examples should begin with:

  1. Require the www
  2. Require no www
  3. Check for a key in QUERY_STRING
  4. Removes the QUERY_STRING from the URL
  5. Fix for infinite loops
  6. Redirect .php files to .html files (SEO friendly)
  7. Redirect .html files to actual .php files (SEO friendly)
  8. block access to files during certain hours of the day
  9. Rewrite underscores to hyphens for SEO URL
  10. Require the www without hardcoding
  11. Require no subdomain
  12. Require subdomain
  13. Redirecting Wordpress Feeds to Feedburner
  14. Only allow GET and PUT request methods
  15. Prevent Files image/file hotlinking and bandwidth stealing
  16. Stop browser prefetching
  17. Make a prefetching hint for Firefox.

    Be aware that mod_rewrite (RewriteRule, RewriteBase, and RewriteCond) code is executed for each and every HTTP request that accesses a file in or below the directory where the code resides, so it’s always good to limit the code to certain circumstances if readily identifiable.

    Source: http://www.askapache.com/htaccess/mod_rewrite-tips-and-tricks.html

    About

    Web Siteblob is a collection of useful web development dictionary for web developers (beginner). Visitors can find information related to php, mysql, javascript, and some server configuration here.

    We wish you can join as our member and start sharing your tricks with everyone.

    As some of the information here is from other sites, credits will be given to these site by stating the source and adding the sites in our friend's link.

    Thank you!


    Sponsors