Support Center

Recent questions

About Koken

This Help Center provides support for Koken, a free content management system designed for photographers, artists and designers.

Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Clean URL's not working. Site keeps adding /koken

Bas van der Poel

Jul 24, 2017 08:47AM EDT

Hi Koken Support,

i'v got an issue with the removal of the "/koken" from my URL's

My website is: https://www.maestro-photography.nl

The .htaccess looks like this:

# Uncomment the following block to force SSL when accessing /admin
<IfModule mod_rewrite.c>
RewriteEngine On
# RewriteCond %{REQUEST_URI} /admin/
RewriteCond %{SERVER_PORT} 80
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>


####### DO NOT EDIT BELOW THIS LINE ########

#MARK#######################################
######## KOKEN .htaccess rules ########
############################################

## Make sure settings.css.lens is rendered as CSS
AddType text/css .lens

## UTF-8 encoding for everything
AddDefaultCharset utf-8

DirectoryIndex index.php index.html

## Enable gzip.
## Highly recommended as it will increase speed for
## both the console and your published site.
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/json application/javascript application/x-javascript
</IfModule>
## END gzip

## Rewrite Rules (Pretty URLs)
## These rules remove index.php/ from your published site links
## and also speed up the serving of cached images.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /

# Pass images requests back to PHP if they do not exist
RewriteCond %{REQUEST_METHOD} =GET
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} /koken/storage/cache/images(/(([0-9]{3}/[0-9]{3})|custom)/.*)$
RewriteRule . /koken/i.php?path=%1 [L]

# Catch root requests (pjax)
RewriteCond %{REQUEST_METHOD} =GET
RewriteCond %{REQUEST_URI} ^/koken/?$
RewriteCond %{QUERY_STRING} _pjax=
RewriteCond %{DOCUMENT_ROOT}/koken/storage/cache/site/koken/index/cache.phtml -f
RewriteRule .* /koken/storage/cache/site/koken/index/cache.phtml [L]

# Catch root requests
RewriteCond %{REQUEST_METHOD} =GET
RewriteCond %{REQUEST_URI} ^/koken/?$
RewriteCond %{QUERY_STRING} !_pjax=
RewriteCond %{DOCUMENT_ROOT}/koken/storage/cache/site/koken/index/cache.html -f
RewriteRule .* /koken/storage/cache/site/koken/index/cache.html [L]

# Catch site requests (pjax)
RewriteCond %{REQUEST_METHOD} =GET
RewriteCond %{QUERY_STRING} _pjax=
RewriteCond %{DOCUMENT_ROOT}/koken/storage/cache/site%{REQUEST_URI}cache.phtml -f
RewriteRule . /koken/storage/cache/site%{REQUEST_URI}cache.phtml [L]

# Catch site requests
RewriteCond %{REQUEST_METHOD} =GET
RewriteCond %{QUERY_STRING} !_pjax=
RewriteCond %{HTTP_COOKIE} !share_to_tumblr=
RewriteCond %{DOCUMENT_ROOT}/koken/storage/cache/site%{REQUEST_URI}cache.html -f
RewriteRule . /koken/storage/cache/site%{REQUEST_URI}cache.html [L]

# CSS / RSS caching
RewriteCond %{REQUEST_METHOD} =GET
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{DOCUMENT_ROOT}/koken/storage/cache/site%{REQUEST_URI} -f
RewriteRule . /koken/storage/cache/site%{REQUEST_URI} [L]

# Rewrite any old URLs that still use index.php?/this/that syntax
RewriteCond %{QUERY_STRING} ^/(.*)
RewriteRule index.php %1? [R,L]

# Rewrite any old URLs that still use index.php/this/that syntax
RewriteRule index.php/(.*)$ $1 [R,L]

# Catch root requests
RewriteRule ^$ /koken/app/site/site.php?url=/ [L,QSA]

# Do not enable path rewriting for files that exist
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !favicon.ico

# For requests that are not actual files
# rewrite to index.php?/PATH
RewriteRule ^(.*)$ /koken/app/site/site.php?url=/$1 [L,QSA]
</IfModule>

## This ruleset ensures core Koken JS and CSS are cached
## for 1 year. These files are always timestamped in new releases,
## so it is safe to cache them for long periods of time.
<IfModule mod_expires.c>
ExpiresActive On
# Set default to 0 so .php/API requests are not cached
ExpiresDefault A0

# Do not cache MP4s, as Chrome and others tend to fail on first playback
<FilesMatch "\.mp4$">
<IfModule mod_headers.c>
ExpiresActive Off
Header set Cache-Control "private, no-cache, no-store, proxy-revalidate, no-transform"
Header set Pragma "no-cache"
</IfModule>
</FilesMatch>

<FilesMatch "console_.*\.(js|css)$">
ExpiresByType application/javascript "access plus 1 year"
ExpiresByType application/x-javascript "access plus 1 year"
ExpiresByType text/css "access plus 1 year"
</FilesMatch>
</IfModule>

## End Rewrite Rules

############################################
####### END KOKEN .htaccess rules ########
############################################


And my index.php looks like this

<?php

$rewrite = false;
$real_base_folder = '/koken';
require '/home/loginname/domains/maestro-photography.nl/public_html/koken' . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'site' . DIRECTORY_SEPARATOR . 'site.php';

Both .htaccess and the index.php are located in the root folder of the domain.
The koken installation is installed in the "maestro-photography.nl/public_html/koken"

What am i doing wrong.
I would love to have nice and clean URL's without the "koken'/" added in the url

5 Community Answers

Answered

Team NetObjects

Jul 25, 2017 12:30PM EDT

Hi. See: Edit site URL

View in conversation


Up 0 rated Down

Team NetObjects Koken Agent

Jul 24, 2017 01:13PM EDT

Hello, rewrite is not enabled on your server. rewrite_enabled. If you are uncertain how to proceed, contact your server administrator or tech support at your hosting company for assistance.

Up 0 rated Down

Bas van der Poel

Jul 25, 2017 12:28PM EDT
Thanks for the fast respons, I checked it with the tech support of my hosting company.
They told me the rewrite is enabled.

Otherwise the url would be something with index.php? right ?
Now the url is https://www.maestro-photography.nl/koken/albums
Where i want them https://www.maestro-photography.nl/albums
Up 0 rated Down

Team NetObjects Koken Agent

Answered Jul 25, 2017 12:30PM EDT

Hi. See: Edit site URL

Up 0 rated Down

Bas van der Poel

Jul 26, 2017 02:26PM EDT
I tried that to.. but unfortunatly that didn't work either.
Also tried to set it back to https://maestro-photography.nl/koken and back again to https://maestro-photography.nl/
I can see it does generate the index.php in the root and changes the .htaccess but it still does not work correctly.
Verified again with my hosting company. They say mod_rewrite is enabled on the server.
Up 0 rated Down

Bas van der Poel

Jul 27, 2017 11:21AM EDT
Solved it.
After clearing the system cache the mod rewrite is working.
No index.php? and no "/koken/"
Thanks for the support !!

This question has received the maximum number of answers.

support@koken.me
http://assets0.desk.com/
false
koken
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete