PDA

View Full Version : http://website.com/XXXXXXX


NextBest
09-22-06, 02:08 PM
Hi everyone,

I run the website http://fileholding.com,
its yet another file sharing page ;)

My problem is that the script uasually gives out the file links as for an example:
http://fileholding.com/1234567 - but this only results in 404 not found.

So I had to temporarily modify the script to give out the full file link which would be: http://fileholding.com/download.php?file=1234567

So what I need to do is make the server redirect http://fileholding.com/1234567 to: http://fileholding.com/download.php?file=1234567

Hope you know the answer :)
Thanks.

Nico
09-22-06, 02:12 PM
Save this as .htaccess on your server.


RewriteEngine on
RewriteRule ^([0-9]+)(/)?$ download.php?file=$1


EDIT:

And protect this directory.
http://fileholding.com/storage/