помогите с Pretty url

Обсуждение CMS Made Simple в России.

Moderators: iturbay, wdwp

Post Reply
dma
Forum Members
Forum Members
Posts: 93
Joined: Wed Jun 04, 2008 12:28 pm

помогите с Pretty url

Post by dma »

Здравствуйте у меня такая проблема.
ЦМС 1.5.4 "Carolina"
Пытаюсь сделать урлы, но получается вот что:
http://mysite.ru/index.php/nazvaniestranicy.htm

В конфиге вот что:
#------------
#URL Settings
#------------

#Show mod_rewrite URLs in the menu? You must enable 'use_hierarchy' for this to work for modules
$config['assume_mod_rewrite'] = false;

#Extension to use if you're using mod_rewrite for pretty URLs.
$config['page_extension'] = '.htm';

#If you don't use mod_rewrite, then would you like to use the built-in
#pretty url mechanism? This will not work with IIS and the {metadata} tag
#should be in all of your templates before enabling.
$config['internal_pretty_urls'] = true;

#If you're using the internal pretty url mechanism or mod_rewrite, would you like to
#show urls in their hierarchy? (ex. http://www.mysite.com/parent/parent/childpage)
$config['use_hierarchy'] = true;

#If using none of the above options, what should we be using for the query string
#variable? (ex. http://www.mysite.com/index.php?page=somecontent)
$config['query_var'] = 'page';

В .htaccess следующее:
Options +FollowSymLinks
RewriteEngine on
RewriteBase /

# 301 Redirect all requests that don't contain a dot or trailing slash to
# include a trailing slash
# except for form POSTS
# RewriteCond %{REQUEST_URI} !/$
# RewriteCond %{REQUEST_URI} !\.
# RewriteCond %{REQUEST_METHOD} !POST$
# RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L]

# Rewrites urls in the form of /parent/child/
# but only rewrites if the requested URL is not a file or directory
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+).htm$ index.php?page=$1 [QSA]

Помогите привести урлы к следующему виду:
http://mysite.ru/nazvaniestranicy.htm

При установке $config['assume_mod_rewrite'] = false;
в true
Урл становится как требуется, но тогда выдается 404 ошибка!
Спасибо.
Post Reply

Return to “Russian - русский”