winrris
winrris

Reputation: 13

htaccess redirecting files with multiple dots in filename

I have a wordpress blog on my server and I wanted to keep some files on subdomain. The thing is that every file which contains multiple dots (example: com.mydomainname.pl.MoveLockScreentoUnlock.deb), when I try to download it its redirecting me to main page of my wordpress. I want to be able to download all files with deb extesnion but I cant.

What shoul I change in my htaccess?

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

Update: Yes file is on the server. Maybe its a problem with suExec? Any other ideas? Its redirecting only if I'm trying to download a file with multiple dots in filename. Im putting full path to this file.

You can check the problem here: http://mojei.pl/cydia/beta/debs/

You can download file: pl.MoveLockScreentoUnlock.deb but you cant download: com.mojei.pl.mObileAlb.deb

-- Response to Eliasdx

Yes file is on the server. Maybe its a problem with suExec? Any other ideas? Its redirecting only if I'm trying to download a file with multiple dots in filename. Im putting full path to this file.

You can check the problem here: http://mojei.pl/cydia/beta/debs/

You can download file: pl.MoveLockScreentoUnlock.deb but you cant download: com.mojei.pl.mObileAlb.deb

Upvotes: 0

Views: 505

Answers (2)

Juraj Puhck&#253;
Juraj Puhck&#253;

Reputation: 11

Hi i have fixed it with my plugin

http://wordpress.org/extend/plugins/fix-multiple-redirects/

Upvotes: 1

Eliasdx
Eliasdx

Reputation: 2180

Add

RewriteCond %{REQUEST_FILENAME} !^(.+)\.deb$

Edit:

However the RewriteCond %{REQUEST_FILENAME} !-f should already do the trick. It should not redirect if the file exists. Are you sure the file is there?

Upvotes: 0

Related Questions