Welcome Guest, Not a member yet? Register   Sign In
Image Path with Browser issue
#1

[eluser]Uresh Patel[/eluser]
HI,

I have developed a website in CI.
Now,i am developing API in PHP(not in CI).
I am sending the Image URL in response to mobile device.

Normally when we directly access the image from full path
Quote:http://www2.warwick.ac.uk/services/commu...all_37.jpg
like this will display image.

But when i supply CI Path like
Quote:localhost/project/public/upload/player/thumb/fec052ce158380169264a493c7159649.jpg


404 Page Not Found
The page you requested was not found.

of CI

I have also attached the .htaccess and error screenshot below.

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|css|images|robots\.txt)
RewriteRule .* index.php/$0 [PT,L]

#2

[eluser]TheFuzzy0ne[/eluser]
Is it an Apache 404 you're seeing, or the CodeIgniter 404?
#3

[eluser]Uresh Patel[/eluser]
404 Page Not Found
The page you requested was not found.

of CI
#4

[eluser]TheFuzzy0ne[/eluser]
If it's a CodeIgniter 404, then it's being re-routed through index.php, which means that either the file doesn't exist, or that your .htaccess file is incorrect.

Here's my .htaccess file. Maybe it'll work for you?

Code:
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_URI} ^/(system|application)
    RewriteRule ^(.*)$ /index.php?/$1 [L]

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /index.php?/$1 [L]
</IfModule>

The first block will redirect any requests for the application or system directory via index.php.

The second block will redirect any requests through index.php if the requested file doesn't exist.
#5

[eluser]Uresh Patel[/eluser]
You are so Brilliant..........




Theme © iAndrew 2016 - Forum software by © MyBB