Ну так вот, с такими настройками на локалхосте, на двух других хостингах все было замечательно, все работает. На этом нет. Не видит он типа index.php и все тут. Отключаю использование дружественных URL - все работает. Стал копать дальше, полез в .htaccess, игрался с настройками RewriteRule ^(.*)$ /path/to/subdirectory/index.php?q=$1 [L,QSA], так и не смог прийти к результатуту, если пишу RewriteRule ^(.*)$ http://mysite.ru/index.php?q=$1 [L,QSA], то работает, т.е. жму на ссылку http://mysite.ru/news/news.html и эта страница загружается, но в адресной строке имею ссылку следующего вида http://mysite.ru/index.php?q=news/news.html, что в принципе нехорошо.
Представители хостинг-компании сказали, что мол надо обращаться к разработчикам движка, надеюсь на вашу помощь и советы.
Заранее благодарен, извиняюсь за сумбур, писал в спешке
RewriteRule ^(.*)$ /path/to/subdirectory/index.php?q=$1 [L,QSA]это:
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
Quote from: LFK at Nov 20, 2006, 06:22 PM
Ну так вот, с такими настройками на локалхосте, на двух других хостингах все было замечательно, все работает. На этом нет. Не видит он типа index.php и все тут. Отключаю использование дружественных URL - все работает. Стал копать дальше, полез в .htaccess, игрался с настройками RewriteRule ^(.*)$ /path/to/subdirectory/index.php?q=$1 [L,QSA], так и не смог прийти к результатуту, если пишу RewriteRule ^(.*)$ http://mysite.ru/index.php?q=$1 [L,QSA], то работает, т.е. жму на ссылку http://mysite.ru/news/news.html и эта страница загружается, но в адресной строке имею ссылку следующего вида http://mysite.ru/index.php?q=news/news.html, что в принципе нехорошо.
Представители хостинг-компании сказали, что мол надо обращаться к разработчикам движка, надеюсь на вашу помощь и советы.
Заранее благодарен, извиняюсь за сумбур, писал в спешке
Наверное Вам нужно написать в .htaccess файле вместо
RewriteRule ^(.*)$ /path/to/subdirectory/index.php?q=$1 [L,QSA]это:
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
/path/to/subdirectory/ имеет смысл прописывать, если у Вас MODx установлен не в корне сайта, а где-будь в поддиректории, к которой можно добраться через путь /path/to/subdirectory/
версия модх?
текущее содержимое .htaccess?
# MODx supports friendly URLs via this .htaccess file. In order to use it, you must change the
# file name from ht.access to .htaccess. If you don’t want to use friendly URLs, you can comment
# the three Rewrite directives out with pound signs (like the beginning of this line).
#
# Make sure RewriteBase points to the directory where you installed MODx.
# E.g., "/" if your installation is in your root web documents directory (it comes this way by
# default) or "/MODx" if your installation is in a MODx subdirectory, per the comments below. You
# must serve web pages via Apache with mod_rewrite to be able to use this functionality.
#
# The last two blocks of rules at the bottom of this .htaccess file address anamolies with IE
# for Windows PCs and the way in which it caches images, which causes a distracting flicker in
# background images when links are hovered on the page.
#
# The output compression directives immediately below serve to speed up delivery of web pages,
# and may also be optionally commented out.
php_flag zlib.output_compression On
php_value zlib.output_compression_level 5
php_flag register_globals off
# Rewrite directives here for SEF (Search Engine Friendly) URLs
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# If your MODx installation is in a subdirectory, change the following line to match the physical
# path to the "root" of the site as follows:
# RewriteRule ^(.*)$ /path/to/subdirectory/index.php?q=$1 [L,QSA]
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
# This following two sections stops screen flicker in IE on rollovers (Bad IE Win, Bad!).
# Comment these sections out if you do not need them. They can result in having to force reload
# pages when developing sites and changing images frequently to see your changes.
#ExpiresActive On
#ExpiresByType image/gif A2592000
#ExpiresByType image/jpeg A2592000
#ExpiresByType image/png A2592000
#BrowserMatch "MSIE" brokenvary=1
#BrowserMatch "Mozilla/4.[0-9]{2}" brokenvary=1
#BrowserMatch "Opera" !brokenvary
#SetEnvIf brokenvary 1 force-no-vary
если не в корне сайта установлен, то нужно в этой строке еще прописать
RewriteBase /subdir (имя папки)
как пишут в самом .htacsses
# E.g., "/modx" if your installation is in a "modx" subdirectory.
ну так сразу бы и говорили скорее всего у Вас на хостинге установлена панель DirectAdmin (сами такую себе на сервер устанавливали) и там именно такие настройки, что временно Ваш сайт будет откликаться по http://ip_hostinga_ili_domen/~youraccount. Короче говоря, когда перепишите NS адреса для своего домена на новый хостинг, все заработает . Проверено.