Ecommerce Shopify WordPress Discussion

ACF permission for users to download the file

I am working on file sharing system where a user is able to upload a file to their account. Now the uploading part works. I made it so it uploads the file into a specific directory based on the user_nicename and the user_id Example:[user_nicename][user_id]/file.pdf So now I was thinking to rewrite the URL when a user clicks on the file to a download.php file which checks if the user is the correct user. .htaccess: # Disable directory listing Options -Indexes # Rewrite requests to /wp-content/uploads/useruploads/ to download.php RewriteRule ^wp-content/uploads/useruploads/(.*)$ /wp-content/themes/Child%20Theme/file-access/download.php?file=$1 [QSA,L] Now the main problem is I am getting a permission error My second inquiry is whether this is deemed safe. or should there be more authentication or should I do this in a complete different way?
Add htaccess in your useruploads folder, to redirect user to download.php file, where you can check, if the user is the correct user.. RewriteEngine on RewriteCond %{REQUEST_FILENAME} -f RewriteRule ^(.*)$ /download.php?path=$1 [L]

January 20, 2024

TurboCommerce make the better internet purchasing globaly

Turbo Multi-language Translator

Make the better internet purchasing globaly

Turbosify SEO Speed Booster

5.0 (7) Free plan available
Get better conversions by improving store loading speed Installed

Turbo Multi-language Chat - AI Customer service in one hand

TurboCommerce make the better internet purchasing globaly
Our products

The help you need, when you need it

App by Turbo Engine

3 apps • 5.0 average rating

Turbosify Speed Booster

5.0 (7)
Get better conversions by optimizing shopify store Google page speed Installed

Turbosify Translator for Wordpress Woocommerce

5.0 (74) Free Wordpress Woocommerce Plugin
Translate your wordpress website to multiple language within 1 click, no configuration needed, no No technical required

Grow your business here

Whether you want to sell products down the street or around the world, we have all the tools you need.