Adding Rewrite Rule For A File In A Theme Directory (2 posts)

  1. aushilfe444
    Posted 4 years ago #

    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...

  2. BlaM4c
    Posted 4 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic