Title: using mod wrewrite
Last modified: August 19, 2016

---

# using mod wrewrite

 *  [sevennine](https://wordpress.org/support/users/sevennine/)
 * (@sevennine)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/using-mod-wrewrite/)
 * 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](http://example.com/permalink-to-single/image.jpg)
 * Help!
 * Thanks in advance!

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

 *  [carlla](https://wordpress.org/support/users/carlla/)
 * (@carlla)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/using-mod-wrewrite/#post-1436584)
 * Does [image.php template](http://codex.wordpress.org/Template_Hierarchy#Attachment_display)
   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](http://example.com/permalink-to-single/image)_
   permalink instead _…/image.jpg _. If it isn’t enough, let us know.
 *  Thread Starter [sevennine](https://wordpress.org/support/users/sevennine/)
 * (@sevennine)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/using-mod-wrewrite/#post-1436757)
 * 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](https://wordpress.org/support/users/carlla/)
 * (@carlla)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/using-mod-wrewrite/#post-1436771)
 * 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](https://wordpress.org/support/users/carlla/)
 * (@carlla)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/using-mod-wrewrite/#post-1436791)
 * Not much help but maybe an idea
    [http://wordpress.org/support/topic/380276?replies=3#post-1456107](http://wordpress.org/support/topic/380276?replies=3#post-1456107)

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

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

## Tags

 * [image](https://wordpress.org/support/topic-tag/image/)
 * [permalinks](https://wordpress.org/support/topic-tag/permalinks/)
 * [post](https://wordpress.org/support/topic-tag/post/)
 * [single](https://wordpress.org/support/topic-tag/single/)
 * [upload](https://wordpress.org/support/topic-tag/upload/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 2 participants
 * Last reply from: [carlla](https://wordpress.org/support/users/carlla/)
 * Last activity: [16 years, 2 months ago](https://wordpress.org/support/topic/using-mod-wrewrite/#post-1436791)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
