Welcome Guest, Not a member yet? Register   Sign In
Problem with URL routing after removing index.php
#1

[eluser]kelseyads2[/eluser]
We configured CodeIgniter to remove the index.php file by removing the index.php in the config settings. We updated our .htaccess file and everything works except when we call script files in the header.

Inside the src="" tag in javascript we can't seem to get anything to load at all.

Here is our .htaccess file contents:

Code:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|css|js|javascript|robots\.txt|favicon\.ico|license.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php/$1 [L,QSA]

And the script tag:

Code:
script type="text/javascript" src="/javascript/tiny_mce/tiny_mce.js"

Anyone know why this would still be routing to the index controller?
#2

[eluser]GSV Sleeper Service[/eluser]
you don't really need this line.
Code:
RewriteCond $1 !^(index\.php|images|css|js|javascript|robots\.txt|favicon\.ico|license.txt)
get rid of it and see how you get on
#3

[eluser]kelseyads2[/eluser]
When I comment that line out it doesn't change anything. The files under images and css load, but not the javascript folder. It's weird.
#4

[eluser]Twisted1919[/eluser]
Check your files/folders permission .
#5

[eluser]kelseyads2[/eluser]
Permissions are fine, when I hit the file URL directly I get the CodeIgniter default 404 error:

<code>
404 Page Not Found

The page you requested was not found.
</code>
#6

[eluser]garymardell[/eluser]
include
Code:
&lt;?=base_url();?&gt;
Before your /javascript links making it a full path not a relative one, if that doesn't help them, dunno Tongue
#7

[eluser]kelseyads2[/eluser]
Don't know why but that did it... thanks!




Theme © iAndrew 2016 - Forum software by © MyBB