Forum Moderators: phranque
I have this folder http://www.example.com/wp-content/gallery
inside gallery i have .htaccess with the following rules
RewriteEngine On
RewriteRule ^(.*\.jpg)$ http://www.example.com/wp-content/gallery/page.php?img=http://www.example.com/wp-content/gallery/$1 [L]
further page.php has
Go back to FrontPage
<img src="<?php echo $_GET['img']; ?>">
however, this doesn't seem to be working; basically what i want is for the images to be shown through page.php so that I may be able to put a menu on the top of the page.php, help is greatly appreciated
thank you!
[edited by: jdMorgan at 9:06 pm (utc) on April 27, 2008]
[edit reason] No URLs, please. See Terms of Service. [/edit]
If you do not use periods in your directory name, then the pattern "^([^.]+\.jpg)$" would be more efficient than the one you're using.
If you use a local filesystem read in your script, your rule would then become:
RewriteEngine on
RewriteRule ^([^.]+\.jpg)$ /wp-content/gallery/page.php?img=$1 [L]