Problems, need help? Have a tip or advice? Post it here.
10 posts Page 1 of 1
I recently ran into a problem with my page, even though i didn't make any changes - the only thing that happened, was that my SSL-certificate was updated, but not changed.

Strangely, the k_page_link seems to be different now.

When on my index page: https://www.graphlex-production.de/

clicking on "info" in the nav-bar should link to the following page:
https://www.graphlex-production.de/ueber/

while it currently links to this (which seems to incorporate the webspace folders somehow..

https://www.graphlex-production.de/www/ ... 8d4/ueber/

The .htaccess file features the following entries:

Code: Select all
Options +SymLinksIfOwnerMatch -MultiViews
<IfModule mod_rewrite.c>
RewriteEngine On

#If your site begins with 'www', uncomment the following two lines
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

#temporary fix to remove the .php extension from non couch pages
RewriteRule ^(audio|datenschutz|dev|impressum|index|web|kontakt|ueber|video)$ "$1/" [R=301,L,QSA]
RewriteRule ^(audio|datenschutz|dev|impressum|index|web|kontakt|ueber|video)/$ $1.php [L,QSA]

#DO NOT EDIT BELOW THIS

RewriteRule ^index.php$ "" [R=301,L,QSA]

RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule . - [L]

#referenzen.php
RewriteRule ^referenzen$ "$0/" [R=301,L,QSA]
RewriteRule ^referenzen/$ referenzen.php [L,QSA]
RewriteRule ^referenzen/.*?([^\.\/]*)\.html$ referenzen.php?pname=$1 [L,QSA]
RewriteRule ^referenzen/([1-2]\d{3})/(?:(0[1-9]|1[0-2])/(?:(0[1-9]|1[0-9]|2[0-9]|3[0-1])/)?)?$ referenzen.php?d=$1$2$3 [L,QSA]
RewriteRule ^referenzen/[^\.]*?([^/\.]*)/$ referenzen.php?fname=$1 [L,QSA]
RewriteRule ^referenzen/[^\.]*?([^/\.]*)$ "$0/" [R=301,L,QSA]

#blog.php
RewriteRule ^blog$ "$0/" [R=301,L,QSA]
RewriteRule ^blog/$ blog.php [L,QSA]
RewriteRule ^blog/.*?([^\.\/]*)\.html$ blog.php?pname=$1 [L,QSA]
RewriteRule ^blog/([1-2]\d{3})/(?:(0[1-9]|1[0-2])/(?:(0[1-9]|1[0-9]|2[0-9]|3[0-1])/)?)?$ blog.php?d=$1$2$3 [L,QSA]
RewriteRule ^blog/[^\.]*?([^/\.]*)/$ blog.php?fname=$1 [L,QSA]
RewriteRule ^blog/[^\.]*?([^/\.]*)$ "$0/" [R=301,L,QSA]

#index.php
RewriteRule ^.*?([^\.\/]*)\.html$ ?pname=$1 [L,QSA]
RewriteRule ^([1-2]\d{3})/(?:(0[1-9]|1[0-2])/(?:(0[1-9]|1[0-9]|2[0-9]|3[0-1])/)?)?$ ?d=$1$2$3 [L,QSA]
RewriteRule ^[^\.]*?([^/\.]*)/$ ?fname=$1 [L,QSA]
RewriteRule ^\w[^\.]*?([^/\.]*)$ "$0/" [R=301,L,QSA]
</IfModule>

# Fonts
# Add correct content-type for fonts
AddType application/vnd.ms-fontobject .eot
AddType application/x-font-ttf .ttf
AddType application/x-font-opentype .otf
AddType application/x-font-woff .woff
AddType image/svg+xml .svg

# Compress compressible fonts
# only uncomment if you dont have compression turned on already. Otherwise it will cause all other filestypes not to get compressed
# AddOutputFilterByType DEFLATE application/x-font-ttf application/x-font-opentype image/svg+xml


## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType text/css "access plus 1 month"
ExpiresByType application/pdf "access plus 1 month"
ExpiresByType text/x-javascript "access plus 1 month"
ExpiresByType application/x-shockwave-flash "access plus 1 month"
ExpiresByType application/javascript "access plus 1 month" 
ExpiresByType application/x-javascript "access plus 1 month"
ExpiresByType image/x-icon "access plus 1 year"
ExpiresByType application/vnd.ms-fontobject "access plus 1 year"
ExpiresByType application/x-font-ttf "access plus 1 year"
ExpiresByType application/x-font-opentype "access plus 1 year"
ExpiresByType application/x-font-woff "access plus 1 year"
ExpiresByType image/svg+xml "access plus 1 year"
ExpiresDefault "access plus 2 days"
</IfModule>
## EXPIRES CACHING ##

# PHP error handling for development servers
php_flag display_startup_errors off
php_flag display_errors off
php_flag html_errors off
php_flag log_errors on
php_flag ignore_repeated_errors off
php_flag ignore_repeated_source off
php_flag report_memleaks on
php_flag track_errors on
php_value docref_root 0
php_value docref_ext 0
php_value error_log /home/path/public_html/domain/PHP_errors.log
php_value error_reporting -1
php_value log_errors_max_len 0


Any help would be greatly appreciated, as i'm struggling to find the cause for this..

Kind regards

Sundance
Please explicitly specify your site's URL (with https) in couch/config.php (you'll find the setting as No. 1 in the file).

Hope this helps.
KK wrote: Please explicitly specify your site's URL (with https) in couch/config.php (you'll find the setting as No. 1 in the file).

Hope this helps.


Hello KK,

thanks for the quick reply - i did that in the config.php, but to no avail. The URL still link the same!

Any idea what i might be doing wrong?

Thanks for your help

Sundance
Sundance, your link is not a couch-managed template? I visited https://www.graphlex-production.de/ueber/ and it worked fine - note the trailing slash! Also https://www.graphlex-production.de/ueber.php worked fine.
active topics, google
Free support is never free.. Donate!
Feedback solicited: [NEW] Couch Constructor
trendoman wrote: Sundance, your link is not a couch-managed template? I visited https://www.graphlex-production.de/ueber/ and it worked fine - note the trailing slash! Also https://www.graphlex-production.de/ueber.php worked fine.


Yes, the URLs you posted work, but for some reason the k_page_link that i used in the code don't work anymore. For example, in my navigation, i have this link in my header code for the navigation point that should link to "Info" page:

Code: Select all
<a href="<cms:show k_site_link />ueber">Info</a>


I never had a trailing slash in there and it always worked! So i was assuming some mis-configuration in the .htaccess file, because i actually didn't change anything in the code whatsoever..
the k_page_link that i used in the code don't work anymore.

Wrong. The mentioned variable k_page_link is a Couch variable available for couch-managed templates only and it is automatically updated by Couch for all addons and also pretty-urls. The example you posted doesn't use a k_page_link, rather k_site_link, which is always the same and depends on config.php setting (if set). So they are not the same!

Did you update the htaccess in this place from http to https?
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
active topics, google
Free support is never free.. Donate!
Feedback solicited: [NEW] Couch Constructor
trendoman wrote:
the k_page_link that i used in the code don't work anymore.

Wrong. The mentioned variable k_page_link is a Couch variable available for couch-managed templates only and it is automatically updated by Couch for all addons and also pretty-urls. The example you posted doesn't use a k_page_link, rather k_site_link, which is always the same and depends on config.php setting (if set). So they are not the same!

Did you update the htaccess in this place from http to https?
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]


Sorry, i must have confused them - the URL set in the config.php is the following:

Code: Select all
https://www.graphlex-production.de/


The .htacess entry is updated to https as well..

Yet there still seems to be a problem with the links. I added a trailing slash to the link i posted above in my header template. It works now. What i don't understand is, why i have to add the slash now when it worked fine before?
Sundance wrote: What i don't understand is, why i have to add the slash now when it worked fine before?

Because before there was an instruction to Apache in your htaccess (RewriteBase) and now it is missing, so Apache doesn't know where to look for the requested page and starts looking from /www folder -
Code: Select all
#If your website is installed in a subfolder, change the line below to reflect the path to the subfolder.
#e.g. for http://www.example.com/subdomain1/subdomain2/ make it RewriteBase /subdomain1/subdomain2
RewriteBase /

Perhaps, it was accidentally removed during the messing around.. CouchCMS by default generates it. I think this is the problem - editing generated htaccess without knowing what to do.
active topics, google
Free support is never free.. Donate!
Feedback solicited: [NEW] Couch Constructor
trendoman wrote:
Sundance wrote: What i don't understand is, why i have to add the slash now when it worked fine before?

Because before there was an instruction to Apache in your htaccess (RewriteBase) and now it is missing, so Apache doesn't know where to look for the requested page and starts looking from /www folder -
Code: Select all
#If your website is installed in a subfolder, change the line below to reflect the path to the subfolder.
#e.g. for http://www.example.com/subdomain1/subdomain2/ make it RewriteBase /subdomain1/subdomain2
RewriteBase /

Perhaps, it was accidentally removed during the messing around.. CouchCMS by default generates it. I think this is the problem - editing generated htaccess without knowing what to do.


As mentioned above, i really didn't change anything else but the https part - but thanks for the clarification, i added it back in and it seems to work fine now.

Thanks for the explanation as well!
Welcome. Glad it worked :)
active topics, google
Free support is never free.. Donate!
Feedback solicited: [NEW] Couch Constructor
10 posts Page 1 of 1

Who is online

In total there are 4 users online :: 1 registered, 0 hidden and 3 guests
(based on users active over the past 5 minutes)

Users browsing this forum: Exabot [Bot] and 3 guests

cron