Abhishek
Abhishek

Reputation: 1561

image without extension is not displaying on apache

I am getting the problem that images without extension is not displaying,this issue arise on changing the server, when i shifted the code from one server to another?

Any clue what i may be missing there or a what short of things have to be enabled or disabled at my server.

Currently what i see that there is a image which displays some binary image data not the actual data.

I am adding .htaccess here that is placed at root of my project --

Options MultiViews
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>

<IfModule !mod_rewrite.c>
    ErrorDocument 404 /index.php
</IfModule>

Any help is greatly appreciated.

url to view is something like -- http://mydomainsname/profileImages/41/profileImage-41-1438705718

Upvotes: 0

Views: 447

Answers (1)

RiggsFolly
RiggsFolly

Reputation: 94672

You need to enable MultiViews content negotiation, which makes Apache select an appropriate representation of a resource. The following directive in .htaccess or an appropriate <Directory>, <Location> or <Files> section should do that.

Options MultiViews

Upvotes: 1

Related Questions