Mod rewrite with the file extensions
Posted: Sat Apr 10, 2010 10:21 am
Hi,
I have pictures kept in the folder like this http://www.mywebsite.com/img_content/extra/
there are list of pictures like,
1_20100321104422.jpg
hp_20100321104555.jpg
ep_m_2010032113455.gif
so I want to rewrite the url from, for instance,
http://www.mywebsite.com/img_content/ex ... 104555.jpg
to
http://www.mywebsite.com/wallpapers/hp_ ... 104555.jpg
which mean you only see this on your browser url,
http://www.mywebsite.com/wallpapers/hp_ ... 104555.jpg
this is my code in .Htaccess file but it won't work,
Many thanks if you have any ideas.
Cheers,
Lau
I have pictures kept in the folder like this http://www.mywebsite.com/img_content/extra/
there are list of pictures like,
1_20100321104422.jpg
hp_20100321104555.jpg
ep_m_2010032113455.gif
so I want to rewrite the url from, for instance,
http://www.mywebsite.com/img_content/ex ... 104555.jpg
to
http://www.mywebsite.com/wallpapers/hp_ ... 104555.jpg
which mean you only see this on your browser url,
http://www.mywebsite.com/wallpapers/hp_ ... 104555.jpg
this is my code in .Htaccess file but it won't work,
Code: Select all
RewriteRule ^wallpapers/([a_zA_Z0_9]+)\.(jpg|gif)$ /img_content/extra/$1.$2 [L]Cheers,
Lau