CSS is not working in Codeigniter on azure cloud service

316 Views Asked by At

I am new to azure cloud. I have a project written in codeigniter which is running well on local machine on iis server but when i deployed on azure everything is working but css js and image file is not getting load. I am suffering from this issue from 2 days. Need your valuable help.

error like : IIS 7.5 Detailed Error - 404.0 - Not Found ,Error Code 0x80070002
Requested URL http://localhost:80/resources/scripts/form-validation.js
Physical Path C:\inetpub\wwwroot\resources\scripts\form-validation.js
Home page URL is : localhost/abc

its not possible to do modification of file.I need help for iis setup or config file or php.ini file change.This program is runing in virtual directory of default site.

2

There are 2 best solutions below

0
On BEST ANSWER

Problem Solved Actually this was problem of iis server.I was using virtual directory instead of iis web site.In virtual dierctory css file locataion was accessed from localhost not localhost\abc. It was problem of iis server virtual directory.

0
On

From the error message, it looks like the requested URL is localhost instead of Azure. So please check Meenesh's suggestion. If that does not work, please provide more details, such as what Azure service (Azure web APP or Azure cloud service or VM etc.) you're using.

its not possible to do modification of file.

If it is possible to modify the code a bit, please try to use base_url to display the image. E.g. src="" />, based on the error message- 404 not found, you may want to refer to How can I display images with the Codeigniter php framework? for several solutions to display images with Codeigniter PHP framework. If you load images within CSS file, you can leverage the ideas from: how to load images of css file in codeigniter to see if it works fine on your side.