I'm trying to setup something to rewrite my .PSD files:
RewriteRule ^([a-z]+)/(.*).psd$ /psd_dump/$2.psd [L]
e.g.
site.com/phrase/1230323.psd < site.com/psd_dump/1230323.psd
Heres my full .htaccess code:
- Code: Select all
Options +FollowSymLinks
RewriteEngine on
RewriteRule ^([a-z\_]+)/thumb_(.*).png$ /previews/thumbs/thumb_$2.png [L]
RewriteRule ^([a-z\_]+)/preview_(.*).png$ /previews/$2.png [L]
[B]RewriteRule ^([a-z]+)/(.*).psd$ /psd_dump/$2.psd [L][/B]
RewriteRule ^search/(.*)/$ /make_search.php?search=$1 [L]
RewriteRule ^sitemap/$ /sitemap/sitemap.txt [L]
RewriteRule ^about/$ /about.php [L]
RewriteRule ^contact/$ /contact.php [L]
RewriteRule ^usercp/$ /usercp.php [L]
RewriteRule ^admin/$ /admin/index.php [L]
RewriteRule ^news/$ /news.php [L]
RewriteRule ^forums/$ /forums/index.php [L]
RewriteRule ^authors/$ /authors.php [L]
RewriteRule ^browse/(.*)/(.*)/index.html$ /browse.php?cat=$1&subcat=$2 [L]
RewriteRule ^browse/(.*)/index.html$ /browse.php?cat=$1 [L]
RewriteRule ^browse/index.html$ /browse.php [L]
RewriteRule ^browse/$ /browse.php [L]
RewriteRule ^(.*)/index.html$ /subpage.php?name=$1 [L]
RewriteRule ^(.*)/$ /subpage.php?name=$1 [L]
RewriteRule ^(.*)/(.*).html$ /subpage.php?name=$1&id=$2 [L]
site.com/sample/1230823.psd, but this wouldnt: site.com/sample_sample/1230823.psd
Notice the "_" .. I'm not sure how i'd fix this within the rewrite, any ideas?