Forum for discussing general topics related to Couch.
3 posts Page 1 of 1
I'm having trouble enabling pretty URLs.
I'm a bit confused of what's actually ment with the root of the site since I can't get it to work and the hosting provider states MOD_REWRITE is enabled.

Let me explain...
If I FTP to my site, I'll get a path with something like:
.../domains/sitename.com/public_html/...

I'm running a test environment on which I try everything first at something like:
.../domains/sitename.com/public_html/TEST/TEST1/...

... is the place with different folders in (eg. backups, domains, Maildir,...) So this can be accessed as well.
... is the place where my site actually begins (with an index.php in which there's a folder with the couch cms).

so basically I assume that ... is the root of my site where I need to place the .htaccess file (compiled as described in the docs)? Or do I actually need to go to the root of the server itself?

Besides is it possible that there's only a folder optimised for MOD_REWRITE as the script which came on the forums to check MOD_REWRITE, doesn't seem to say it actually does, where support of the hosting said it actually does?

Everything I try keeps breaking up the site and at best when entering the list view of the template, the css seems gone, rendering the page without css.

I'm a bit confused...
root of the site
For Couch, this is the immediate parent folder of the 'couch' folder. So, for example if your Couch admin panel is accessed as
http://www.yoursite.com/couch/
the root above is http://www.yoursite.com/ (i.e. which translates usually to the /public_html/ or /htdocs/ folder on the server). For
http://www.yoursite.com/test/test/couch/
the root is http://www.yoursite.com/test/test/ (i.e. /public_html/test/test/ on the server)

..when entering the list view of the template, the css seems gone, rendering the page without css.
This is actually a sign that prettyURL is working!
You see, if your HTML code contains relative links for images/css/js etc., once you enable prettyURLs - the links will no longer point to the right location.

Please see http://www.couchcms.com/docs/tutorials/ ... -ends.html
in our tutorials (scroll down to prettyURLs section) for a discussion.
This topic also recently came up at -
viewtopic.php?f=8&t=7628.

Hope this helps.
Thanks. Tip from the thread worked perfectly...
maybe better to put this in the document as well for future reference. :idea:

KK wrote: Thank you Paolo for the tip.

I'd like to add to your comment that using <cms:show k_site_link /> is always a preferable way of converting relative links to absolute ones. e.g.
<link rel="stylesheet" type="text/css" href="css/style.css"/>
can be made
<link rel="stylesheet" type="text/css" href="<cms:show k_site_link />css/style.css"/>
This way, your site becomes 'migration proof'.

BTW, this problem of relative paths breaking with prettyURls is not a Couch specific thing. It'll happen anywhere you use URL rewriting. It has been discussed in the docs at -
http://www.couchcms.com/docs/tutorials/ ... -ends.html

Thanks again.
3 posts Page 1 of 1
cron