Snippet from my htaccess:
#display articles from writings
RewriteRule writings/(.*)/ display.php?article=$1
RewriteRule writings/(.*) display.php?article=$1
Ok, i'm using mod_rewrite to make URLs prettier on my website http://sinisterfrog.com
I am doing this in the writings section to change something like http://sinisterfrog.com/display.php?article=gamelan
That all works fine. At the moment however I have my site set up with a directory called writings as well (which is where all the articles are stored)
display.php calls the article from the URL, talks to mysql and spits out the appropriate titles etc, then includes the contents of one of the text files in the writings directory.
So, my problem is, there is a better way to do this.... and my bigger problem (the one the points are for) is that images don't work. If i store an image in the writings directory, I can't access it by going to http://sinisterfrog.com/writings/image.gif
because of my primitive rewriterule.
So if you can help me jazz up my rewrite rule a lot, you win, and i'll be very grateful.