Download error
-
This guide doesn’t work https://docs.easydigitaldownloads.com/article/194-are-download-files-protected
The hoster did as it says, and when users try to upload a file, they are redirected to the main page.
The page I need help with: [log in to see the link]
-
Can you provide some more info please on the topic. What kind of server are you using ? What rules did your hosting provider configured?
Could you send a screenshot to see where the issue is ocurring, as you mentioned on file uploadsThe hoster has completed the configuration for your guide as a technical task.
The server runs on NGINX.
The hoster added a rule according to your instructions and when you try to download a file from a direct link, the user redirects to the main page and this is great, but…
When a user places an order and clicks on a long link from the plugin, it also redirects to the main page.
Example:
test/wp-admin/test/1.zip – redirects to the main page.
test/index. php?add file=19973%3A19776%… – redirects to the main page.The plugin itself works fine, but it does not protect the folder from direct downloads, and when you try to configure it according to your instructions, this problem occurs.
I use a translator, I hope I explained it clearly.
Can you ask your hosting provider to provide you with the exact rule changes that they applied ?
I’ll try to ask…
in nginx config added:
rewrite ^/wp-content/uploads/edd/(.*)\.zip$ / permanent;We tested the rule on our end and it is working correctly. Has your webhost configured it properly and after that did they restart Nginx service ?
Here is the configuration file, Nginx was restarted, there was no redirection to the main page before it was restarted. Even the VDS was rebooted.
IP and domain changed to avoid problems 🙂server { server_name domen.ru www.domen.ru; charset UTF-8; index index.php index.html; disable_symlinks if_not_owner from=$root_path; include /etc/nginx/vhosts-includes/*.conf; include /etc/nginx/vhosts-resources/domen.ru/*.conf; access_log /var/www/httpd-logs/domen.ru.access.log; error_log /var/www/httpd-logs/domen.ru.error.log notice; ssi on; set $root_path /var/www/blackwotrublitz/data/www/blackwotru; root $root_path; location / { location ~ [^/]\.ph(p\d*|tml)$ { try_files /does_not_exists @fallback; } location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf)$ { try_files $uri $uri/ @fallback; expires 30d; } location / { try_files /does_not_exists @fallback; } } location @fallback { proxy_pass http://127.0.0.1:8080; proxy_redirect http://127.0.0.1:8080 /; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Port $server_port; access_log off; proxy_buffer_size 64k; proxy_buffers 4 64k; proxy_busy_buffers_size 64k; } listen [here is the IP address of the server]:80; gzip on; gzip_comp_level 5; gzip_disable "msie6"; gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript; rewrite ^/wp-content/uploads/edd/(.*)\.zip$ / permanent; } server { server_name domen.ru www.domen.ru; ssl_certificate "/var/www/httpd-cert/blackwotrublitz/domen.ru.crt"; ssl_certificate_key "/var/www/httpd-cert/blackwotrublitz/domen.ru.key"; ssl_ciphers EECDH:+AES256:-3DES:RSA+AES:!NULL:!RC4; ssl_prefer_server_ciphers on; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; add_header Strict-Transport-Security "max-age=31536000;"; ssl_dhparam /etc/ssl/certs/dhparam4096.pem; charset UTF-8; index index.php index.html; disable_symlinks if_not_owner from=$root_path; include /etc/nginx/vhosts-includes/*.conf; include /etc/nginx/vhosts-resources/domen.ru/*.conf; access_log /var/www/httpd-logs/domen.ru.access.log; error_log /var/www/httpd-logs/domen.ru.error.log notice; ssi on; set $root_path /var/www/blackwotrublitz/data/www/blackwotru; root $root_path; location / { location ~ [^/]\.ph(p\d*|tml)$ { try_files /does_not_exists @fallback; } location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf)$ { try_files $uri $uri/ @fallback; expires 30d; } location / { try_files /does_not_exists @fallback; } } location @fallback { proxy_pass http://127.0.0.1:8080; proxy_redirect http://127.0.0.1:8080 /; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Port $server_port; access_log off; proxy_buffer_size 64k; proxy_buffers 4 64k; proxy_busy_buffers_size 64k; } listen [here is the IP address of the server]:443 ssl; gzip on; gzip_comp_level 5; gzip_disable "msie6"; gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript; rewrite ^/wp-content/uploads/edd/(.*)\.zip$ / permanent; }-
This reply was modified 5 years, 2 months ago by
blacklightsorane.
Can you provide with a test/sample download link of a file (an EDD download link) to test ?
Something like that?
https://blackwot.ru/downloads/test/An actual download link. I tried making a purchase on your site but I did not received a download link for the files. It was asking me to add some other account stuff to my profile.
-
This reply was modified 5 years, 2 months ago by
The topic ‘Download error’ is closed to new replies.