BoZoN icon indicating copy to clipboard operation
BoZoN copied to clipboard

url friendly?

Open Hernandy opened this issue 8 years ago • 6 comments

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,

Hernandy avatar Jun 21 '16 07:06 Hernandy

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 ;-)

broncowdd avatar Jul 17 '16 08:07 broncowdd

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

beatles1 avatar Jul 22 '16 09:07 beatles1

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

broncowdd avatar Jul 28 '16 11:07 broncowdd

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]

jpfleury avatar Feb 26 '17 23:02 jpfleury

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

broncowdd avatar Feb 27 '17 06:02 broncowdd

And in my todo for bozon3 :)

broncowdd avatar Feb 27 '17 07:02 broncowdd