• I don’t know much about .htaccess when it comes to using modrewrite.

    I have a script that generates dynamic images and had found an .htaccess that allowed the images to be called with a “friendly” or “pretty” url.

    I.E. https://www.example.com/dynamic/name/image.png would call https://www.example.com/dynamic.php?name=image.png

    All worked well until I installed WordPress and changed the permalink structure to the date/name-based option.

    The line I had in my .htaccess file to call the dynamic images was “RewriteRule dynamic/(.*)/(.*)$ /dynamic.php?$1=$2” and it worked fine, but putting this back in doesn’t seem to work anymore.

    If anyone knows what to do in this situation or at least point me to a working resource where I can learn to fix it myself, I’d greatly appreciate it. Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Falklian

    (@falklian)

    /bump

    Just a thought, did you put your rule before or after WordPress’ addition to the .htaccess?

    I think WP will catch any request for a non-existing file or directory and handle it internally, so you would need to have your own rules first, leaving anything you do not handle to WP.

    Thread Starter Falklian

    (@falklian)

    Thanks for the reply.

    I had it placed at the beginning of the file and WordPress was still trying to handle it (of course not being able to find it and displaying a 404)

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘.htaccess and search-engine-friendly urls’ is closed to new replies.