1

I have a problem loading my js and css into my little project. It says not found. Please help me what to do. It says 404(Not Found)

This is where my footer is:

<script type="text/javascript" src="<?php echo base_url(); ?>datatables/media/js/jquery.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>datatables/media/js/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>bootstrap-master/docs/assets/js/ie10-viewport-bug-workaround.js"></script>
<script type="text/javascript" src= "<?php echo base_url(); ?>assets/js/jquery.js"></script>
<script type="text/javascript" src= "<?php echo base_url(); ?>assets/js/jquery-ui.min.js"></script>
<script type="text/javascript" src= "<?php echo base_url(); ?>assets/js/boostrap.js"></script>
<script src= "<?php echo base_url(); ?>assets/js/boostrap.min.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>bootstrap-master/docs/assets/js/ie-emulation-modes-warning.js"></script>
<script type="text/javascript" src="<?php echo base_url('assets/js/jquery.validate.js')?>"></script> 

While my htaccess file.

    <IfModule mod_rewrite.c>
  RewriteEngine On
  # !IMPORTANT! Set your RewriteBase here and don't forget trailing and leading
  #  slashes.
  # If your page resides at
  #  http://www.example.com/mypage/test1
  # then use
  # RewriteBase /mypage/test1/
  RewriteBase /DepEd

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

</IfModule>

<IfModule !mod_rewrite.c>
  # If we don't have mod_rewrite installed, all 404's
  # can be sent to index.php, and everything works as normal.
  # Submitted by: ElliotHaughin

  ErrorDocument 404 /index.php
</IfModule>
10
  • Is your server running on the port 80 ? Commented Jan 26, 2015 at 16:29
  • what is your base_url(); ? Commented Jan 26, 2015 at 16:31
  • His base URL judging from the errors is http://localhost/DepEd/ @AadilKeshwani Commented Jan 26, 2015 at 16:32
  • I got weird apache port. it changes everytime. today, i got 54043, 5404. Commented Jan 26, 2015 at 16:32
  • I got $config['base_url'] = ' '; I am using codeigniter Commented Jan 26, 2015 at 16:34

1 Answer 1

1

Can you please try to change your .htaccess by

   <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /

    # Removes index.php from ExpressionEngine URLs

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

    </IfModule>

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

?

Sign up to request clarification or add additional context in comments.

5 Comments

Still not working sir. I got redirected to the xampp.
I saw some question that is similar to my problem, and I also tried replacing my htaccess of what they answered, but still not working. :(
I guess setting $config['base_url'] = 'http://'.$_SERVER['HTTP_HOST'].'/'; in your application/config/config.php can help you solve this issue
Are you able to open ` localhost/DepEd/assets/js/boostrap.js` in your browser ? Try to locate this file through browser. If not than you might not have places your assets folder at htdocs/DepEd/assets

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.