Page 9 of 21

Re: Clean URLs

Posted: Mon Apr 14, 2014 1:08 pm
by tanavots
cmb wrote: You can try the following .htaccess instead (not sure if that'll work):

Code: Select all

RewriteEngine on

# set the rewrite base to the user directory
RewriteBase /~name/

# Do not rewrite requests to existing directories and files:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# Everything else is a CMSimple_XH page request,
# so shift the subfolders to the beginning of the query string
RewriteRule ^([A-z]{2}/)?(.*)$ $1?$2 [QSA]
Unfortunately not.

Re: Clean URLs

Posted: Mon Apr 14, 2014 2:00 pm
by cmb
I've set up a user dir enviroment and the original .htaccess as well the modified one (with the proper RewriteBase) worked for me. :?

It might be best to ask your server admin(s); the .htaccess should be enough info for them to figure out the solution.

Re: Clean URLs

Posted: Tue Apr 15, 2014 10:26 am
by tanavots
cmb wrote:I've set up a user dir enviroment and the original .htaccess as well the modified one (with the proper RewriteBase) worked for me. :?

It might be best to ask your server admin(s); the .htaccess should be enough info for them to figure out the solution.
Sorry, my bad... Figured out, what was wrong. As this was test site in subfolder I forgot to add folder name

Code: Select all

RewriteBase /~name/testsite/

Re: Clean URLs

Posted: Tue Apr 15, 2014 10:59 am
by cmb
tanavots wrote:As this was test site in subfolder I forgot to add folder name
Thanks for the feedback. Good to know that there's a solution regarding user directories.

THANK YOU!!!

Posted: Tue Apr 29, 2014 11:46 am
by Maxim
cmb wrote:Find function XH_printUrl() in cmsimple/tplfuncs.php and replace it with the following:...
THANK YOU!!!

Не загружаются изображения

Posted: Mon May 26, 2014 4:32 am
by Maxim
[ external image ] Здравствуйте. Не загружаются изображения.
[ external image ] Guten Tag. Nicht die Bilder werden geladen.
[ external image ] Hello. Do not load images.

Re: Clean URLs

Posted: Fri May 30, 2014 5:32 am
by tanavots
cmb wrote: Toggling between edit and view mode in the back-end
Switching to view mode in the back-end will change to the "non clean" URLs. That's no problem, but you can change this behavior easily. Find function XH_adminMenu() in cmsimple/adminfuncs.php and replace the following line:

Code: Select all

            'url' => '?' . $su . '&' . $changeMode, 
with:

Code: Select all

            'url' => $su . '&' . $changeMode, 
I noticed, that line is changed in 1.6.2. Instead of & is &. Is there more changes that may affect CleanURL?

Re: Clean URLs

Posted: Fri May 30, 2014 11:06 am
by cmb
Maxim wrote:Не загружаются изображения.
I have replied some days ago via PM.
tanavots wrote:I noticed, that line is changed in 1.6.2. Instead of & is &.
Indeed. That was done to allow for a cleaner XH_registerPluginMenuItem() API (actually, URLs use & to separate parameters; & is only needed when the URL is written to (X)HTML, so it's cleaner to escape the URLs late).
tanavots wrote:Is there more changes that may affect CleanURL?
Frankly, I don't know. I have checked my clean URL recipe, and this is the only place where something has changed (I have edited the post accordingly).

To stay on top of things regarding clean URLs, I deem it necessary to make them available in the core. I hope my proposal will be accepted for CMSimple_XH 1.7.

Thank you.

Posted: Thu Jun 05, 2014 6:18 am
by Maxim
[ external image ] Исправил:
[ external image ] Korrigiert:
[ external image ] Corrected:
plugins/filebrowser/classes/Filebrowser_View.php
plugins/filebrowser/tpl/cmsbrowser.php

Thank you.

URLs без www (.htaccess)

Posted: Fri Jun 06, 2014 4:50 am
by Maxim
[ external image ] Доброе утро. Предлагаю изменения в файле .htaccess. URLs без www.
[ external image ] Guten morgen. Schlage vor, änderungen in der .htaccess-Datei. URLs ohne www.
[ external image ] Good morning. Proposes changes to the .htaccess file. URLs without www.

Code: Select all

RewriteEngine on

# URLs without www
RewriteCond %{HTTP_HOST} ^www.(.+)$ [NC]
RewriteRule ^(.*) http://%1/$1 [L,R=301]

# Do not rewrite requests to existing directories and files:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# Everything else is a CMSimple_XH page request,
# so shift the subfolders to the beginning of the query string
RewriteRule ^([A-z]{2}/)?([^.]*)(.html)?$ $1?$2 [QSA]