I have urls like this: WxW.domain.com/picture/subfolder/showpic.htm?img=blah.jpg Code (markup): id like urls like: WxW.domain.com/picture/subfolder/showpic/blah Code (markup): Whats the relevant syntax to put in my .htaccess file? Thanks
The most easier way will be doing something like this .htaccess write this RewriteEngine On RewriteBase / ErrorDocument 404 /showpic.htm showpic.htm it's actually an php file? then you need to write this $search=trim($_SERVER["REQUEST_URI"]); this will get you the called url .. and you extract the picture name with an explode like $excade=explode(''picture/subfolder/showpic/',$search); echo $excade[1]; // this is your image name so $img yu got with $_GET['img'] you can set it to excade[1]
This is what I actually did: RewriteRule ^pictures/([^/]*)/showpic/([^/]*)$ /pictures/$1/showpic.htm?img=$2.JPG Code (markup): But i would now actually like: RewriteRule ^pictures/([^/]*)/([^/]*)$ /pictures/$1/showpic.htm?img=$2.JPG Code (markup): However that throws a 500? Why is that?