broncowdd / BoZoN

Minimalist Drag & drop file sharing app (version 2.4 build 15)
Other
283 stars 47 forks source link

url friendly? #161

Open Hernandy opened 8 years ago

Hernandy commented 8 years ago

Possible to remove index.php? (/index.php?f=15768ecdcc423a) friends paranoid saw .php file i share even it was an image with .jpg extension

ok with random string, at least shows the extension like .png .jpg,

broncowdd commented 8 years ago

yes, you can remove index.php from the share url: something like that: www.server.com/?f=15768ecdcc423a I'll do it on the next version... thx ;-)

beatles1 commented 8 years ago

That would be great as a start.

Would it also be possible to add an option for and an example of a .htaccess file that would allow server.com/15768ecdcc423a to be used instead?

An option to also append the initial file extension to the end could be good as well e.g. server.com/15768ecdcc423a.jpg

broncowdd commented 8 years ago

It could be great but that's url rewriting: that's not bozon's job ;-)

jpfleury commented 7 years ago

We can use the URL pattern server.com/15768ecdcc423a instead of server.com/?f=15768ecdcc423a by putting the following code in the file .htaccess:

RewriteEngine on
RewriteRule ^([a-z0-9]{14})$ http://server.com/?f=$1 [L]

If BoZoN is installed in a subfolder, we can use the URL pattern server.com/folder/15768ecdcc423a instead of server.com/folder/?f=15768ecdcc423a with this code:

RewriteEngine on
RewriteRule ^folder/([a-z0-9]{14})$ http://server.com/folder/?f=$1 [L]
broncowdd commented 7 years ago

Thx a lot, I'll put it in the future documentation.

broncowdd commented 7 years ago

And in my todo for bozon3 :)