Welcome Guest, Not a member yet? Register   Sign In
Error 404 Page Not Found --> js
#4

[eluser]skunkio[/eluser]
Thank you for your answers first of all.
I think I'm not getting the point so I try to explain better what I have done.

My MAMP webroot is like

Quote:MAMP
htdocs
my_site_folder
site
application_front
config
controllers
...
.
public
images
css
javascript
upload

and inside my config file I have the configuration below

Code:
$config['base_url']           = $PROTOCOL.$_SERVER['HTTP_HOST']."/";
$config['front_base_url']   = $config['base_url'];
$config['file_upload_base_url']          = $config['front_base_url']."upload/";
$config['css_images_js_base_url'] = $config['base_url']."public/";

if($_SERVER['HTTP_HOST'] == "localhost:8888" )
{
$config['base_url']    .= "my_site_folder/";  
$config['front_base_url']   = "http://".$_SERVER['HTTP_HOST']."my_site_folder/";
$config['server_absolute_path']  = "/my_site_folder/site";
$config['file_upload_absolute_path'] = "/my_site_folder/upload/";
$config['file_upload_base_url']   = $config['front_base_url']."upload/";
$config['css_images_js_base_url'] = $config['base_url']."site/public/";
}
else
{
        my live server configuration is here
}

then within my view i have, within the head this line to recall my js file

Code:
<$cript type="text/javascript" src="&lt;?php echo css_images_js_base_url();?&gt;javascript/my_js.js"></$cript>

the source of the page is correct and like below

Quote:<$cript type="text/javascript" src="http://localhost:8888/my_site_folder/site/public/javascript/my_js.js"><$cript>

For the css and images the same approach is working.
Then I have tried to add the base_url() tag within the &lt;header&gt; and change the path of my js with a relative one but without the echo part. Same result, it's not working.
What is wrong with my configuration?

Thanks in advance for your support


Messages In This Thread
Error 404 Page Not Found --&gt; js - by El Forum - 03-26-2012, 03:03 PM
Error 404 Page Not Found --&gt; js - by El Forum - 03-26-2012, 03:23 PM
Error 404 Page Not Found --&gt; js - by El Forum - 03-26-2012, 07:11 PM
Error 404 Page Not Found --&gt; js - by El Forum - 03-27-2012, 03:26 PM
Error 404 Page Not Found --&gt; js - by El Forum - 03-27-2012, 07:10 PM
Error 404 Page Not Found --&gt; js - by El Forum - 03-28-2012, 02:38 PM
Error 404 Page Not Found --&gt; js - by El Forum - 03-28-2012, 06:19 PM



Theme © iAndrew 2016 - Forum software by © MyBB