Просмотр файла portfolio/.htaccess

Размер файла: 2.72Kb
AddDefaultCharset UTF8

RewriteEngine on

RewriteRule ^panel/settings.xhtml$  /panel/settings.php [QSA,L]
RewriteRule ^panel/contacts.xhtml$  /panel/contacts.php [QSA,L]
RewriteRule ^panel/profile.xhtml$  /panel/profile.php [QSA,L]

RewriteRule ^user/entry.xhtml$  /user/entry.php [QSA,L]
RewriteRule ^user/exit.xhtml$  /user/exit.php [QSA,L]
RewriteRule ^user/registration.xhtml$  /user/registration.php [QSA,L]

RewriteRule ^news/index.xhtml$  /news/index.php [QSA,L]
RewriteRule ^news/index.xhtml/page=([a-z0-9]+)$  /news/index.php?page=$1 [QSA,L]
RewriteRule ^news/([0-9]+).xhtml?$ /news/view_news.php?id_news=$1 [L,QSA]

RewriteRule ^news/inc/add_news.xhtml$  /news/inc/add_news.php [QSA,L]
RewriteRule ^news/inc/edit/([0-9]+).xhtml$  /news/inc/edit_news.php?id_news=$1 [QSA,L]
RewriteRule ^news/inc/delete/([0-9]+).xhtml$  /news/inc/delete_news.php?id_news=$1 [QSA,L]

RewriteRule ^portfolio/inc/add_category.xhtml$  /portfolio/inc/add_category.php [QSA,L]
RewriteRule ^portfolio/inc/edit_category/([0-9]+).xhtml$  /portfolio/inc/edit_category.php?id_category=$1 [QSA,L]
RewriteRule ^portfolio/inc/delete_category/([0-9]+).xhtml$  /portfolio/inc/delete_category.php?id_category=$1 [QSA,L]
RewriteRule ^portfolio/inc/edit_work/([0-9]+).xhtml$  /portfolio/inc/edit_work.php?id_work=$1 [QSA,L]
RewriteRule ^portfolio/inc/add_work.xhtml$  /portfolio/inc/add_work.php [QSA,L]
RewriteRule ^portfolio/inc/delete_work/([0-9]+).xhtml$  /portfolio/inc/delete_work.php?id_work=$1 [QSA,L]

RewriteRule ^reviews/add_review.xhtml$  /reviews/add_review.php [QSA,L]
RewriteRule ^reviews/inc/delete/([0-9]+).xhtml$  /reviews/inc/delete_review.php?id_review=$1 [QSA,L]

RewriteRule ^reviews/index.xhtml$  /reviews/index.php [QSA,L]
RewriteRule ^reviews/index.xhtml/page=([a-z0-9]+)$  /reviews/index.php?page=$1 [QSA,L]


RewriteRule ^panel/news.xhtml$  /panel/news.php [QSA,L]
RewriteRule ^panel/news.xhtml/page=([a-z0-9]+)$  /panel/news.php?page=$1 [QSA,L]
RewriteRule ^panel/works.xhtml$  /panel/works.php [QSA,L]
RewriteRule ^panel/works.xhtml/page=([a-z0-9]+)$  /panel/works.php?page=$1 [QSA,L]
RewriteRule ^panel/category.xhtml$  /panel/category.php [QSA,L]

RewriteRule ^category/([0-9]+).xhtml$  /portfolio/view_category.php?id_category=$1 [QSA,L]
RewriteRule ^category/([0-9]+).xhtml/page=([a-z0-9]+)$  /portfolio/view_category.php?id_category=$1&page=$2 [QSA,L]

RewriteRule ^works/([0-9]+).xhtml$  /portfolio/view_work.php?id_work=$1 [QSA,L]


RewriteRule ^pages/404.xhtml$  /pages/404.php [QSA,L]
RewriteRule ^pages/contacts.xhtml$  /pages/contacts.php [QSA,L]
RewriteRule ^pages/profile.xhtml$  /pages/profile.php [QSA,L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?url=$1 [L,QSA]