Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => Images

How can i retrive the filename in .htaccess file

images php coding issues or problems here.

Moderators: macek, egami, gesf

How can i retrive the filename in .htaccess file

Postby santu143us » Mon Jun 27, 2005 3:44 am

Hi,
I am presently working on a project which is basiaclly a Music Forum. The Forums include MP3 files.

http://www.sitename.com/uploads/filename.mp3 how can retrieve the the file name [mp3 filename] in the .htaccess file

How to achieve this?

Thanks in advance,
santhosh
santu143us
New php-forum User
New php-forum User
 
Posts: 3
Joined: Wed Jun 22, 2005 4:20 am

Postby ruturajv » Wed Jun 29, 2005 10:15 pm

please check mod_rewrite
User avatar
ruturajv
php-forum Super User
php-forum Super User
 
Posts: 1280
Joined: Sat Mar 22, 2003 9:42 am
Location: Mumbai, India

Postby gesf » Thu Jun 30, 2005 1:17 pm

Environment variables inside %{}.
Example:
Code: Select all
RewriteCond %{HTTP_HOST} ^([^.]+)\.
RewriteCond %1 !^www$ [NC]
RewriteRule ^(.*)$ http://www.whatever.com%{REQUEST_URI} [R,L]
So, what you need is probably %{SCRIPT_NAME}
User avatar
gesf
Moderator
Moderator
 
Posts: 1717
Joined: Sun Dec 29, 2002 5:03 am
Location: Portugal / Sweden


Return to PHP coding => Images

Who is online

Users browsing this forum: No registered users and 2 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.