ПРОЕКТЫ 


  АРХИВ 


Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


  СТАТЬИ 


  ПЕРСОНАЛЬНОЕ 


  ПРОГРАММЫ 



ПИШИТЕ
ПИСЬМА












     АРХИВ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Правило .htaccess для /2z-project



On Wed, Jan 30, 2008 at 12:54:15PM +0200, Помазан Богдан wrote:

> Есть такой новый CMS движок http://2z-project.ru

Мне вот, что непонятно в этом новом CMS-движке - PHP в принципе не умеет
работать с УРЛами, отличными от /page.php?user=vasya&action=kill,
или же писатели нового движка в 2007 году так и не научились делать
нормальные УРЛы не с помощью RewriteRule's.

> Там довольно большой .htaccess
> 
> Можно написать правило под него..
> 
> #
> # Copyright (C) 2006-2007 2z project (http://2z-project.com)
> # Name: .htaccess
> # Description: mod_rewrite
> # Author: 2z project team
> #
> 
> DirectoryIndex index.php
> 
> <files .htaccess>
> order allow,deny
> deny from all
> </files>
> 
> php_flag register_globals off
> php_flag magic_quotes_gpc off
> php_flag magic_quotes_runtime off
> php_flag magic_quotes_sybase off
> 
> RewriteEngine On
> RewriteBase /
> 
> RewriteCond %{REQUEST_FILENAME} -f [OR]
> RewriteCond %{REQUEST_FILENAME} -d
> RewriteRule ^.*$ - [S=35]
> 
> # Editable links
> RewriteRule ^category/([^/]*)(/?)+$ ?category=$1 [QSA,L]
> RewriteRule ^category/([^/]*)/page/([0-9]+)(/?)+$ ?category=$1&cstart=$2 
> [QSA,L]
> RewriteRule ^([0-9]{4})/([0-9]{2})/([0-9]{1,2})(/?)+$
> ?year=$1&month=$2&day=$3 [QSA,L]
> RewriteRule ^([0-9]{4})/([0-9]{2})/([0-9]{1,2})/page/([0-9]+)(/?)+$
> ?year=$1&month=$2&day=$3&cstart=$4 [QSA,L]
> RewriteRule ^([0-9]{4})/(/?)+$ ?year=$1 [QSA,L]
> RewriteRule ^([0-9]{4})/page/([0-9]+)(/?)+$ ?year=$1&cstart=$2 [QSA,L]
> RewriteRule ^([0-9]{4})/([0-9]{2})(/?)+$ ?year=$1&month=$2 [QSA,L]
> RewriteRule ^([0-9]{4})/([0-9]{2})/page/([0-9]+)(/?)+$
> ?year=$1&month=$2&cstart=$3 [QSA,L]
> RewriteRule ^users/([^/]*)(/?)+$ ?action=users&user=$1 [QSA,L]
> RewriteRule ^page(/?)+$ ?cstart=0 [QSA,L]
> RewriteRule ^page/([0-9]+)(/?)+$ ?cstart=$1 [QSA,L]
> RewriteRule ^addnews.(htm|html)(/?)+$ ?action=addnews [QSA,L]
> RewriteRule ^profile.(htm|html)(/?)+$ ?action=profile [QSA,L]
> RewriteRule ^registration.(htm|html)(/?)+$ ?action=registration [QSA,L]
> RewriteRule ^activation.(htm|html)(/?)+$ ?action=activation [QSA,L]
> RewriteRule ^activation/([0-9]{1,7})/([^/]*)(/?)+$
> ?action=activation&userid=$1&code=$2 [QSA,L]
> RewriteRule ^lostpassword.(htm|html)(/?)+$ ?action=lostpassword [QSA,L]
> RewriteRule ^(feed|rss|rss2).xml(/?)+$ 2z/includes/rss.php [QSA,L]
> RewriteRule ^category/([^/]*)/(feed|rss|rss2).xml(/?)+$
> 2z/includes/rss.php?category=$1 [QSA,L]
> RewriteRule ^(.*).html(/?)+$ ?action=static&altname=$1 [QSA,L]
> RewriteRule ^plugin/([^/]*)(/?)+$ ?action=plugin&plugin=$1 [QSA,L]
> RewriteRule ^category/([^/]*)/(.*).(html|htm)(/?)+$
> ?category=$1&altname=$2 [QSA,L]
> RewriteRule ^category/([^/]*)/(.*)/([0-9]+)(/?)+$
> ?category=$1&altname=$2&page=$3 [QSA,L]
> RewriteRule ^category/([^/]*)/(.*).print(/?)+$
> 2z/includes/print.php?category=$1&altname=$2 [QSA,L]
> 
> -- 
> Помазан Богдан Юрьевич.
> IT отдел СК "ПМСК"
> ICQ: 149-134-767
> тел: 8 (063) 180-25-05

-- 
Игорь Сысоев
http://sysoev.ru



 




Copyright © Lexa Software, 1996-2009.