• sevennine

    (@sevennine)


    I want to use the rewrite rules to add some custom link functionality for my site. While I’ve comfortable with PHP and plugins but the whole rewrite situation is confusing me.

    I want WP to accept URLs that are similar to the single-post URLs but with a jpg file extension at the end of it. i.e. I want to be able to accept:
    http://example.com/permalink-to-single/image.jpg

    Help!

    Thanks in advance!

Viewing 4 replies - 1 through 4 (of 4 total)
  • carlla

    (@carlla)

    Does image.php template help you? If all you want is get a page to each image, this is a way. You may use the image.php template to get http://example.com/permalink-to-single/image permalink instead …/image.jpg . If it isn’t enough, let us know.

    Thread Starter sevennine

    (@sevennine)

    Carlla

    It didn’t seem to work. The images aren’t uploaded through WP so that might be the issue. Do you have another idea?

    carlla

    (@carlla)

    hm.. so I think we are two. I’m trying to make external uploads too.

    When the uploaded file comes from the normal wp upload engine, the image.php template works well and I can get a image with pretty url. But when I use an background php file to save some file and make a new wp_posts record, the new image doesn’t appear, I get a 404 instead. Does it happen with you too?

    The most crazy thing happens when I copy a ‘guid’ value from another attachment post: it works, I can see the image as a normal image (but I get the another file, of curse). Both guid values are existing files (the first uploded through wp and the second an external upload), so it is not the problem.

    So I think the new attachment on wp_posts is ok, but there is another thing we must to do on data base and I don’t know what is.

    Let’s try to solve it?
    I will post here when get any progress.

    carlla

    (@carlla)

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘using mod wrewrite’ is closed to new replies.