HOWTO Enable SEF URLs

Enable SEF URLs or other URL presets in Cotonti Siena

Since version 0.9.4 Cotonti comes with some URL presets for your choice. This short article will help you to enable them.

#1. Using the Handy preset

Most users who want SE and human friendly URLs will need to do this:

  1. Install the URL Editor plugin in Administration / Extensions if you haven't installed it yet.
  2. Go to Administration / Extensions / URL Editor / Configuration and choose Handy preset there.
  3. Open sef-urls.htaccess file in the root of your site. There you will find rules to put them into your site's main .htaccess file. Substitute RewriteBase path with your value if necessary. (Nginx users should enhance their nginx.conf with the contents from sef-urls.nginx.conf file respectively).
  4. Done!

#2. Using the old URLs from Genoa

If you need backwards-compatible old-way URLs like page.php?al=somepage, then you should do this:

  1. Install the URL Editor plugin in Administration / Extensions if you haven't installed it yet.
  2. Go to Administration / Extensions / URL Editor / Configuration and choose 'Genoa/Seditio compatible' preset there.
  3. Done!

#3. Using your own custom URL preset

You can still use your own custom urltrans.dat file and URL editor backend like you did in previous versions of Cotonti. You can enable your custom preset in Administration / Extensions / URL Editor / Configuration as well. The editor for urltrans.dat is still located in Administration / Other / URL Editor.



1. akzami  2011-09-21 08:34

Если чтото непонятно, прочитайте английское описание.

2. Fox  2011-09-24 16:49

Если на руском непонятно то на английском вобще непойму.

Спасибо за перевод!!! Так держать, а то документации вобще нету

3. Boss  2011-09-27 05:37

На этот текст ссылка из новости про новую версию движка "подробности... про ЧПУ, идущие в комплекте с системой", вроде как логично что сюда будут заходить люди чтобы посомтреть что за ЧПУ собственно реализованны. А здесь ни слова про это. Лишь про установку. Примеры пожалуйста сделайте.

4. akzami  2011-09-27 18:17

Пример для Русской версии: по пути Управление сайтом / Расширения/Плагины/URL Editor/ Конфигурация

и в списке пресетов выбираем к примеру "Удобный",сохраняемся по кнопке "обновить".

Далее по фтп ищем файл sef-urls.htaccess и извлекаем из него информацию. Внутри моего файла было следущее:

___________________________________________________________________

################ Cotonti Handy URLs for Apache #######################

# Below are the rules to be included in your main .htaccess file or httpd.conf

# Rewrite engine options
Options FollowSymLinks -Indexes
RewriteEngine On

# Server-relative path to Cotonti. Replace it with your path if you run Cotonti
# in a subfolder
RewriteBase "/"

# Default path and static files protection
RewriteRule ^(datas|images|js)/(.*)$ $1/$2 [QSA,NC,NE,L]
RewriteRule ^(.*)\.(css|js|gif|jpg|png|ico)$ $1.$2 [QSA,NC,NE,L]

# Language selector
RewriteRule ^(en|ru|de|nl)/(.*) index.php?rwr=$2&l=$1 [QSA,NC,NE]

# Protect standard .php URLs
RewriteRule ^([a-z]+)\.php(.*)$ $1.php$2 [QSA,NC,NE,L]

# Admin area and message are special scripts
RewriteRule ^admin/([a-z0-9]+) admin.php?m=$1 [QSA,NC,NE,L]
RewriteRule ^(admin|login|message)(/|\?|$) $1.php [QSA,NC,NE,L]

# All the rest goes through standard rewrite gateway
RewriteRule ^([^?]+) index.php?rwr=$1 [QSA,NC,NE,L]

___________________________________________________________________

всё это переписываем в .htaccess и радуемся.

Пути выглядят к примеру, так: 
http://akzami.com/users/admin
http://akzami.com/forums/radio
http://akzami.com/news/4

хотя некоторые пути все ещё выглядят криво , к примеру,

http://akzami.com/forums?m=posts&q=4

У меня работает только пресет "Удобный", при включении других не работает часть функций, наверное опять чтото не то сделал....

5. KUbo_0  2012-04-26 18:10

 

Интересует вопрос:
 
как выглядит urltrans.dat аналогичный преседу «удобный» ?
6. Stalker  2013-03-29 23:45

Установил удобный, всё равно в URL editor висит надпись 

Warning: Invalid argument supplied for foreach() in /var/www/tor/data/www.сайт.com/plugins/urleditor/inc/urleditor.functions.php on line 343

При попытке добавить комментарий - 

Не найдено (404)

Запрошенный ресурс сервером не найден.
Запрошенный URL устарел, ошибочен, или доступ к нему закрыт.

Но коммент добавляется. Как это лечится?

 

 

 

 

7. Wilder  2013-04-27 20:57
Only registered users can post new comments