Artem_Paris
Новичок
Подскажите плиз, что не так делаю?
хочу добиться того, чтобы при обращении к http://sitename.ru/articles/postname/bla/bla/bla/ работал файл /articles/index.php?что_то=bla&что_то=bla и т.д.
Если обращаюсь к чему угодно по-другому, например:
http://sitename.ru/contact index.php&mod=contact
http://sitename.ru/events index.php&mod=events
Делаю так:
хочу добиться того, чтобы при обращении к http://sitename.ru/articles/postname/bla/bla/bla/ работал файл /articles/index.php?что_то=bla&что_то=bla и т.д.
Если обращаюсь к чему угодно по-другому, например:
http://sitename.ru/contact index.php&mod=contact
http://sitename.ru/events index.php&mod=events
Делаю так:
Код:
AddDefaultCharset UTF-8
php_value max_execution_time 800
php_value max_input_time 800
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?target=$1 [QSA,L]
RewriteRule ^articles/$ /articles/index.php [L]
RewriteRule ^articles/([0-9]{4})/$ articles/index.php?year=$1 [L]
{... и другие условия по articles...}
</IfModule>