Problems, need help? Have a tip or advice? Post it here.
5 posts Page 1 of 1
Hi

I host my site with IONOS php/mysql/website hosting and I'm trying to get pretty urls to work. It does work to an extent: the pages all load where they should be but the trouble is the CSS is broken - it can't find the path to the CSS styles anymore. It gives me this error message in the "Style Editor" tab of my browser's inspector function:

Code: Select all
<h1>Multiple Choices</h1>
The document name you requested (<code>/read/css/main.css</code>) could not be found on this server.
However, we found documents with names similar to the one you requested.<p>Available documents:
<ul>
<li><a href="/read.php/css/main.css">/read.php/css/main.css</a> (common basename)
</ul>


I've generated a new .htaccess with couch/gen_htaccess.php and placed it in root directory, so why is this happening? Surely the website should be rewriting the paths?

Thank you
Did you use k_site_link?
Code: Select all
<link rel="stylesheet" href="<cms:show k_site_link />read.php/css/main.css">
Hi

Thank you for your reply. I haven't linked my CSS like that, no:

Code: Select all
<link rel="stylesheet" type="text/css" href="css/main.css">
<link rel="stylesheet" type="text/css" href="css/navbar.css">
<link rel="stylesheet" type="text/css" href="css/template.css">
<link rel="stylesheet" type="text/css" href="css/comments.css">


Mine is linked like this so I have no idea why the website thinks its under read.php/css/main.css
My css folder is in the root folder, and read.php is also in the root folder:

Code: Select all
/ 
   css/
   assets/
   embeds/
   read.php
   index.php
   watch.php
   etc


However, read.php actually embeds a different file using couch embeds, which is /embeds/read_homepage.html. Maybe this is part of the issue? However it was never an issue before I turned pretty urls on.
You need to create absolute paths:

Code: Select all
<link rel="stylesheet" type="text/css" href="<cms:show k_site_link />css/main.css">
<link rel="stylesheet" type="text/css" href="<cms:show k_site_link />css/navbar.css">
<link rel="stylesheet" type="text/css" href="<cms:show k_site_link />css/template.css">
<link rel="stylesheet" type="text/css" href="<cms:show k_site_link />css/comments.css">
Hi

Thank you very much, I will try this out!
5 posts Page 1 of 1