Clean URLs
Почему нельзя пользоваться переменными в .htaccess?
[ external image ] Почему нельзя пользоваться переменными в .htaccess? Переменные в .htaccess:
[ external image ] Warum kann ich keine Variablen in. htaccess? Variablen in. htaccess:
[ external image ] Why can not I use variables in .htaccess? Variables in .htaccess:
http://f9r.ru/mod_rewrite.acti.vars.html
http://rapidup.ru/stati/Htaccess_Rewrit ... imery.html
[ external image ] Warum kann ich keine Variablen in. htaccess? Variablen in. htaccess:
[ external image ] Why can not I use variables in .htaccess? Variables in .htaccess:
http://f9r.ru/mod_rewrite.acti.vars.html
http://rapidup.ru/stati/Htaccess_Rewrit ... imery.html
Simple Hosting
Бедная, бросаемая бурею, безутешная!
Бедная, бросаемая бурею, безутешная!
Re: Clean URLs
This code would be necessary to have internationalized names for login, sitemap, print and mailform. I'm not sure, however, if that would still work with CMSimple_XH 1.6(.x).Maxim wrote:Многое не понял нужно добавлять или нет. Этот код не добавлял:
The code in my former post should suppress the printlinks for mailform, sitemap and login.Maxim wrote:Как не печатать:
.htaccess doesn't know anything about PHP, because it is processed before the PHP. So it is not possible to inform .htaccess about any configuration made in CMSimple_XH.Maxim wrote:Почему нельзя пользоваться переменными в .htaccess? Переменные в .htaccess:
Last edited by cmb on Wed Apr 09, 2014 11:39 am, edited 1 time in total.
Reason: fixed link
Reason: fixed link
Christoph M. Becker – Plugins for CMSimple_XH
Допустил ошибку
[ external image ] Не понял, что это за ссылка?cmb wrote:[ external image ] The code in my former post should suppress the printlinks for mailform, sitemap and login.Maxim wrote:[ external image ] Как не печатать:
[ external image ] Nicht verstanden, was das für ein Link?
[ external image ] Did not understand, what is that link?
[ external image ] ...CMSimple_XH-161-CleanURLs-2014-04-08 - допустил ошибку.
[ external image ] ...CMSimple_XH-161-CleanURLs-2014-04-08 - ein Fehler unterlaufen.
[ external image ] ...CMSimple_XH-161-CleanURLs-2014-04-08 - made a mistake.
[ external image ] ...CMSimple_XH-161-CleanURLs-2014-04-09 - сегодня утром разместил на сайте.
[ external image ] ...CMSimple_XH-161-CleanURLs-2014-04-09 - heute morgen veröffentlicht auf der Website.
[ external image ] ...CMSimple_XH-161-CleanURLs-2014-04-09 - this morning posted on the website.
Simple Hosting
Бедная, бросаемая бурею, безутешная!
Бедная, бросаемая бурею, безутешная!
Re: Clean URLs
Sorry, the link was wrong. I fixed it now.Maxim wrote:Не понял, что это за ссылка?
Christoph M. Becker – Plugins for CMSimple_XH
Print view на главной странице сайта
[ external image ] СПАСИБО!!! Завтра исправлю.
[ external image ] VIELEN DANK!!! Morgen korrigieren.
[ external image ] THANK YOU!!! Tomorrow will fix it.
[ external image ] Когда на главной странице сайта выбираю "Print view":
[ external image ] Wenn auf der Homepage wähle "Print view":
[ external image ] When on the main page of the site choose the "Print view":
/&print.html
[ external image ] Сложно создать такой вид?:
[ external image ] Schwierig ist, eine solche Art?:
[ external image ] It is difficult to create such a view?:
/Welcome_to_CMSimple_XH&print.html
[ external image ] VIELEN DANK!!! Morgen korrigieren.
[ external image ] THANK YOU!!! Tomorrow will fix it.
[ external image ] Когда на главной странице сайта выбираю "Print view":
[ external image ] Wenn auf der Homepage wähle "Print view":
[ external image ] When on the main page of the site choose the "Print view":
/&print.html
[ external image ] Сложно создать такой вид?:
[ external image ] Schwierig ist, eine solche Art?:
[ external image ] It is difficult to create such a view?:
/Welcome_to_CMSimple_XH&print.html
Simple Hosting
Бедная, бросаемая бурею, безутешная!
Бедная, бросаемая бурею, безутешная!
Re: Clean URLs
Well, the cleaner solution would be to redirect users to Welcome_to_CMSimple_XH in the first place. (As it is now, there is duplicate content, what should generally be avoided.) This could be done by modifying cmsimple/cms.php. Find the following line:Maxim wrote:Сложно создать такой вид?:
/Welcome_to_CMSimple_XH&print.html
Code: Select all
rfc(); // Here content is loaded
Code: Select all
if ($_SERVER['REQUEST_METHOD'] == 'GET' && empty($_GET)) {
header('Location: ' . CMSIMPLE_URL . '?' . $u[0]);
exit;
}
Code: Select all
if ($_SERVER['REQUEST_METHOD'] == 'GET' && empty($_GET)) {
header('Location: ' . CMSIMPLE_URL . '?' . $u[0], true, 301);
exit;
}
[1] To solve this very duplicate content issue, one can use the Canonical Plugin.
Christoph M. Becker – Plugins for CMSimple_XH
Я не об этом говорил
[ external image ] СПАСИБО!!!
[ external image ] VIELEN DANK!!!
[ external image ] THANK YOU!!!
[ external image ] Я не об этом говорил. Когда находишься на главной странице сайта и выбираешь "Login" у ссылки такой вид:
[ external image ] Ich habe nicht darüber gesprochen. Wenn man auf der Homepage und wählen Sie "Login" bei den Links so Aussehen:
[ external image ] I don't talked about this. When you're on the main page, and select "Login" link to look like this:
/Welcome-to-CMSimple_XH&login.html
[ external image ] Хочется такой же принцип и для "Print view". Страница по умолчанию:
[ external image ] Wollen wir dasselbe Prinzip für "Print view". Der Standard:
[ external image ] I want the same principle to "Print view". The default page:
/
[ external image ] Только при печати:
[ external image ] Nur beim drucken:
[ external image ] Only when printing:
/Welcome-to-CMSimple_XH&print.html
[ external image ] Добавил этот код:
[ external image ] Hinzugefügt diesen Code ein:
[ external image ] Added this code:
[ external image ] VIELEN DANK!!!
[ external image ] THANK YOU!!!
[ external image ] Я не об этом говорил. Когда находишься на главной странице сайта и выбираешь "Login" у ссылки такой вид:
[ external image ] Ich habe nicht darüber gesprochen. Wenn man auf der Homepage und wählen Sie "Login" bei den Links so Aussehen:
[ external image ] I don't talked about this. When you're on the main page, and select "Login" link to look like this:
/Welcome-to-CMSimple_XH&login.html
[ external image ] Хочется такой же принцип и для "Print view". Страница по умолчанию:
[ external image ] Wollen wir dasselbe Prinzip für "Print view". Der Standard:
[ external image ] I want the same principle to "Print view". The default page:
/
[ external image ] Только при печати:
[ external image ] Nur beim drucken:
[ external image ] Only when printing:
/Welcome-to-CMSimple_XH&print.html
[ external image ] Добавил этот код:
[ external image ] Hinzugefügt diesen Code ein:
[ external image ] Added this code:
Code: Select all
$su = substr($su, 0, $cf['uri']['length']);
foreach (array('login', 'mailform', 'print', 'sitemap') as $i) {
if (!empty($GLOBALS[uenc($tx['menu'][$i])])) {
$$i = 'true';
}
}
Simple Hosting
Бедная, бросаемая бурею, безутешная!
Бедная, бросаемая бурею, безутешная!
Re: Clean URLs
Hey!
Found, that CleanURL not working if domain name is as http://www.domain.ee/~name/
Main page is working fine, but not any of links.
e.g. http://www.domain.ee/~name/Languages
give error
Not Found
The requested URL /home/name/public_html/ was not found on this server.
Tested with CMSimple 1.57, 1.59, 1.6 and 1.6.1.
Any idea?
Found, that CleanURL not working if domain name is as http://www.domain.ee/~name/
Main page is working fine, but not any of links.
e.g. http://www.domain.ee/~name/Languages
give error
Not Found
The requested URL /home/name/public_html/ was not found on this server.
Tested with CMSimple 1.57, 1.59, 1.6 and 1.6.1.
Any idea?
Re: Clean URLs
Find function XH_printUrl() in cmsimple/tplfuncs.php and replace it with the following:Maxim wrote:Я не об этом говорил. Когда находишься на главной странице сайта и выбираешь "Login" у ссылки такой вид:
/Welcome-to-CMSimple_XH&login.html
Хочется такой же принцип и для "Print view". Страница по умолчанию:
/
Только при печати:
/Welcome-to-CMSimple_XH&print.html
Code: Select all
function XH_printUrl()
{
global $f, $search, $file, $sn, $u;
$t = '&print';
if ($f == 'search') {
$t .= '&function=search&search=' . stsl($search);
} elseif ($f == 'file') {
$t .= '&file=' . $file;
} elseif ($f != '' && $f != 'save') {
$t .= '&' . $f;
} elseif (sv('QUERY_STRING') != '') {
$t = sv('QUERY_STRING') . $t;
} else {
$t = $u[0] . $t;
}
$t = XH_hsc($t);
return $sn . '?' . $t;
}
Christoph M. Becker – Plugins for CMSimple_XH
Re: Clean URLs
You can try the following .htaccess instead (not sure if that'll work):tanavots wrote:Found, that CleanURL not working if domain name is as http://www.domain.ee/~name/
Main page is working fine, but not any of links.
e.g. http://www.domain.ee/~name/Languages
give error
Not Found
The requested URL /home/name/public_html/ was not found on this server.
Tested with CMSimple 1.57, 1.59, 1.6 and 1.6.1.
Any idea?
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]
Christoph M. Becker – Plugins for CMSimple_XH