When I enable the "Pretty URLs" css does not show

Permalink
Hi

I have tried to enable the "Pretty URLs" and can see that the urls do get rid of the "/index.php/" in the url.

So far so good ;-)

But the css path does no longer match as I can see in the code it still use the /index.php/ in the path.

<!-- Site Header Content //-->
<link rel="stylesheet" media="screen" type="text/css" href="/~c4492621/software/index.php/tools/css/themes/default/main.css" />
<link rel="stylesheet" media="screen" type="text/css" href="/~c4492621/software/index.php/tools/css/themes/default/typography.css" />

So does anyone know what to do here ?

As this is coming from the CMS (this is the code in the plain yogurt php header)
<!-- Site Header Content //-->
<link rel="stylesheet" media="screen" type="text/css" href="<?php echo $this->getStyleSheet('main.css')?>" />
<link rel="stylesheet" media="screen" type="text/css" href="<?php echo $this->getStyleSheet('typography.css')?>" />

Of cource I can remove the "<?php echo $this->getStyleSheet('" and replace with handcoded path, but I guess the idea was that is should be "dynamic"

Brian1961
 
ralanyo replied on at Permalink Reply
I am having this same issue right now. Did you ever find the answer?
Mnkras replied on at Permalink Reply
Mnkras
so you just want to remove the
index.php
from
/index.php/tools/css/themes/default/typography.css
?

if so (not recommended) you can stick this in your site.php

define("URL_REWRITING_ALL", true);
ralanyo replied on at Permalink Best Answer Reply
Okay I figured this out. The problem was that I bought the cpanel installer from Concrete5. It is used to create multiple instances on a single server. It works flawlessly and is well worth the money but when you install a new site into a new directory on your server, it forgets to write two lines of code into the site.php file.

So what happens when you turn on pretty urls is the base url gets all screwed up and your css path too.

To fix this you have to go into /config/site.php file and add the following lines of code.
define('BASE_URL', 'http://www.yourdomain.com');
define('DIR_REL', '');


The above code showshttp://www.yourdomain.com as the base url. The DIR_REl is as above if you are not using a directory structure.

If you are using a directory structure then it will be something like, this.

define('BASE_URL', 'http://www.yourdomain.com');
define('DIR_REL', '/yourdirectory');
Brian1961 replied on at Permalink Reply
Brian1961
Thanks a lot
That did it ;-)