WordPress.org

Support

Support » Miscellaneous » WP Mod Rewrite – How does it work?

WP Mod Rewrite – How does it work?

  • Hi,

    I’m I wasn’t sure where to post this but here goes, just a short and probably complicated question.

    How does wordpress perform its URL rewriting? As there isn’t a .htaccess file present?

    Any points in the right direction or explanations would be greatly appreciated.

    Thanks! =]

Viewing 5 replies - 1 through 5 (of 5 total)
  • WordPress does use an .htaccess file, so I’m not sure what exactly you’re talking about…

    Whoops, hadn’t turned on pretty links so the htaccess file hadn’t been generated.

    It has now which I guess points all requests to the index.php file, I was just curious as to how say a list of rewritten url’s could be stored in a database instead of being detailed in an .htaccess file.

    But as all requests are sent to index.php I assume some form of check is done at run-time.

    The WP_Rewrite class does all that. Look in wp-includes/rewrite.php. It’s highly complicated though, more than I understand fully. 🙂

    cool, thanks man =]

    To quote from the mod_rewrite documentation, “Despite the tons of examples and docs, mod_rewrite is voodoo. Damned cool voodoo, but still voodoo.”

    I have found that it sometimes requires you sacrifice a live chicken under the light of a full moon to get things to work, and I’m a trained professional.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘WP Mod Rewrite – How does it work?’ is closed to new replies.
Skip to toolbar