Support » Plugins » Hacks » Adding Rewrite Rule For A File In A Theme Directory

  • I have a page in my theme directory that receives and processes a variable via get and returns an image (i want it to work as an image server).

    sth like wordpress/wp-content/themes/mytheme/images.php?v=bla-bla.png

    now i would like to set a rewrite rule for that page.

    sth like wordpress/images/bla-bla.png

    how do i go about this?

    i could do it in .htaccess but i would prefer a solution that is implemented in my theme. but as i’m new to mod rewrite and wordpress this task blows my mind…

Viewing 1 replies (of 1 total)
  • Can’t help you with your actual request, but I want to remind you that using .htaccess is about 1.000.000 times (well, kinda) faster than starting up the PHP engine, loading and compiling all files required to execute wordpress, connecting to the database, and so on.

Viewing 1 replies (of 1 total)
  • The topic ‘Adding Rewrite Rule For A File In A Theme Directory’ is closed to new replies.