![]() ![]() How sweet is that?Īnother common use of mod_rewrite is to map old URLs to new URLs Programs like WordPress and Drupal have support built-in. How else are they supposed to know index.php?postid=6 is a different page than index.php?postid=7 ? They go by many names: Friendly URLs Search Engine Friendly URLs Rational URLs s Mod_rewrite is mostly used to implement “friendly” URLs. RewriteCond let you define behavior, like making the browser edirect to the rewritten URL, telling the browser the page is one, or returning a certain MIME ype.įor a full list of RewriteCond and RewriteRule options, read the docs at: Get really nice “cheat sheets” you can print at: RewriteEngine on|off RewriteCond RewriteRule The main mod_rewrite directives: They're all you need to get started. htaccess file if I have to put them in nf, I usually make a separate file and include it Include rewrite_nf Mod_rewrite directives can go in the Apache config file (nf) or in an. Request Apache Request mod_rewrite Apache directives Other modules Mod_rewrite is an Apache module that takes what the browser requests and “rewrites” it into something else before the other Apache modules see it Apache mod_rewrite Dave Ross The West Suburban Chicago PHP Meetup April 3, 2008 ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |