The mod_rewrite module uses a rule-based rewriting engine, based on a PCRE regular-expression parser, to rewrite requested URLs on the fly. By default, mod_rewrite maps a URL to a filesystem path. However, it can also be used to redirect one URL to another URL, or to invoke an internal proxy fetch.

learn more… | top users | synonyms

11
votes
1answer
12k views

How to create custom URL routes?

I have a very peculiar requirement, hopefully I can explain it without being too confusing. I created a page template where I list some properties I get from an external XML file, so far no problems, ...
3
votes
2answers
3k views

Making a plugin file accessible via url rewrite?

In my WordPress plugin I have a php file that generates some stats about the blog and outputs it as a simple text file. To access WordPress functions I've included this at the top of the file: ...
0
votes
1answer
2k views

Interesting Custom Post Type Slug with Taxonomy and Custom Field

I have created a custom post type called "events" and have also created a custom taxonomy which only shows up on this specific post type through which the admin must select an "event category" ...
4
votes
2answers
311 views

My permalinks are broken! Can I use mod_rewrite to ignore a physical file?

A website I work on recently posted a file at the root of their website named "2011.html." Now, any 2011 blog posts with the permalink structure of year/month/day/post-name do not work, and instead ...
3
votes
2answers
1k views

Change author permalink

The original urls for users look like /author/login/ Is it possible to replace login by user's id? In my dream urls should become to /users/34/ (34 is user id). Thanks.
0
votes
3answers
845 views

Need to make a php file inside theme accessible via url

I checked this post here Making a plugin file accessible via url rewrite? which seems to have the same problem as me but its for a plugin. But so far i am getting 404. add_action( 'init', ...
0
votes
2answers
964 views

Why is my mod_rewrite not working?

Ok I have a WP site using the permalink structure of /%category%/%postname%/ I have built it in the way of page templates, using category queries inside, i.e. page-help.php <?php $my_query = new ...