Problems, need help? Have a tip or advice? Post it here.
8 posts Page 1 of 1
Does anyone know why this is and how I can fix it? I have SSL enabled so maybe this is the cause? It works fine on my localhost, but when I upload it to the web server it stops working properly. Any advice would be appreciated; it's very annoying to have to go through all my folders to get to the page. Thanks.
By "Viewing a page in the editor", I assume you mean when you try to visit a front-end page by clicking a link in the admin-panel.
If that is so, all links from the admin-panel are non-pretty - if the prettyURL feature has been configured and is working as expected, the front-end automatically redirects the non-pretty link to its pretty version.

So, I think, probably prettyURL feature is not working properly on your new server.
Have you made sure to enable it in couch/config.php and then generated a new .htaccess and placed it in your site root?
Yes, and it's still not working. I checked several times and it won't work.
There is a link to a utility at https://docs.couchcms.com/concepts/pret ... leshooting
Please use it to make sure 'mod_rewrite' module is available on your site.
Hi @KK. Mod Rewrite is set; I used the test. It was working before; it's only stopped recently since I enabled SSL, so I was wondering if maybe that was the cause.
Were any custom rules added to the .htaccess file after enabling SSL?
If so, please post them here.
At one point there was, but I overwrote it several times over when I did gen_htaccess.php. I don't remember what the rules were, though.
Ok so I had a look at the issue first-hand and found that this problem (a non-pretty URL not redirecting to its pretty counterpart) was limited to a single template; rest of the templates were behaving as expected.

So, of course, this was not an issue with prettyURLs per se.

Some digging into the issue revealed that the template displaying the issue had a blank line before its opening PHP statement i.e. before <?php require_once( 'couch/cms.php' ); ?>

This was preventing the redirect to take place. Removing the blank line, thus making the statement the very first thing PHP encounters while parsing the template, solved the issue.

For anyone running into a similar problem, please make sure there are no whitespaces, newlines etc before the mentioned first statement.
In fact having even hidden characters (the infamous BOM bytes - viewtopic.php?f=4&t=53) before the statement can lead to this issue. So please make sure to save your file as 'UTF8 without BOM'.
8 posts Page 1 of 1