mardi 28 juillet 2015

How i can access an image with a random name from the name of the folder?

I have a folder with one file and i need access to it using only the Folder name. This is basically the struct:

  • Folder
    • File.ext (Random name)

For example: When i go to "http://ift.tt/1fEnqH8" i need to redirect me to "http://ift.tt/1fEnt5H".

I tried with ".htaccess" but not achieved what I need:

 RewriteEngine On
 RewriteBase /
 RewriteRule ^/Folder/$ /Folder/*.ext

Exists some regular expression to solve this problem with htaccess? or some other solution to this problem?

Aclaration: the folder only contains one file, and this file have a random name.




Aucun commentaire:

Enregistrer un commentaire