SEF \.htaccessдля SocialEngine 3 - соберем полный ?

Статус
В этой теме нельзя размещать новые ответы.

Neow15ard

Постоялец
Регистрация
26 Ноя 2008
Сообщения
418
Реакции
190
Есть такой вот конфиг.
Но в нем нет
Question URL: Для просмотра ссылки Войди или Зарегистрируйся
Реврайта user_question.php и т.д.. Можно писать все по одно но может есть у кого ?
здесь еще нет запрета на админку по ип, нет многих вкусных вещей.
Кто что может докинуть из полезностей .Прошу отпишите
Я видел замечательные сайты где после правки htacces вообще было по урл не разобрать что это sc. И дырки все типа xss и inject sql
прикрыты.
<files ~ "\.tpl$">
order deny,allow
allow from none
deny from all
</files>
AddDefaultCharset UTF-8
php_value default_charset utf-8
php_flag register_globals off



RewriteEngine On
Options +Followsymlinks
RewriteBase /
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.* - [L,QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^.*/images/(.*)$ /images/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^.*/uploads_user/(.*)$ /uploads_user/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/?$ /profile.php?user=$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/([^/]+)?$ /profile.php?user=$1&v=$2 [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/game/([0-9]+)/?$ /game.php?user=$1&game_id=$2 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/articles/([^/]+)?$ /articles.php?user=$1$2 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/articles/?$ /articles.php?user=$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^article/([0-9]+)(/[^/]*)?$ /article.php?article_id=$1&article_slug=$2 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/gstores/([0-9]+)/?$ /gstore.php?user=$1&gstore_id=$2 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/gstores/([0-9]+)/([^/]+)?$ /gstore.php?user=$1&gstore_id=$2$3 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/gstores/?$ /gstores.php?user=$1 [L]



RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*/)?badge/([0-9]+)/([^/]*)$ /badge.php?badge_id=$1$2$3 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*/)?badgeassignment/([0-9]+)/([^/]*)$ /badgeassignment.php?badgeassignment_id=$1$2$3 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*/)?badgeusers/([a-zA-Z]+)/([0-9]+)/([^/]*)$ /badgeusers.php?type=$2&type_id=$3$4 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*/)?business/([0-9]+)/([^/]*)/?$ /business.php?business_id=$2 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*/)?business/([0-9]+)/album/([0-9]+)/([^/]*)$ /business_album_file.php?business_id=$2&businessmedia_id=$3$4 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*/)?businesses/category/([0-9]+)/([^/]*)/?$ /browse_businesses.php?businesscat_id=$2 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*/)?businesses/tag/([^/]+)/?$ /browse_businesses.php?tag=$2 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*/)?businesses/neighborhood/([^/]+)/([^/]*)?$ /browse_businesses.php?neighborhood=$2$3 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*/)?businesses/location/([^/]+)/([^/]+)/([^/]+)/([^/]*)?$ /browse_businesses.php?type=location&country=$2&province=$3&city=$4$5 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*/)?businesses/location/([^/]+)/([^/]+)/([^/]*)?$ /browse_businesses.php?type=location&country=$2&province=$3$4 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*/)?businesses/location/([^/]+)/([^/]*)?$ /browse_businesses.php?type=location&country=$2$3 [L]





RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/question/([0-9]+)/?$ /question.php?user=$1&qid=$2 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^[^/]+/questions/([0-9]+)/?$ /browse_questions.php?qacat_id=$1 [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/polls/([0-9]+)/?$ /poll.php?user=$1&poll_id=$2 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/polls/([0-9]+)/([^/]+)?$ /poll.php?user=$1&poll_id=$2$3 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/polls/?$ /polls.php?user=$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*/)?event/([0-9]+)/([^/]*)$ /event.php?event_id=$1$2$3 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*/)?event/([0-9]+)/album/([0-9]+)/([^/]*)$ /event_album_file.php?event_id=$2&eventmedia_id=$3$4 [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*/)?group/([0-9]+)/([^/]*)$ /group.php?group_id=$1$2$3 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*/)?group/([0-9]+)/album/([0-9]+)/([^/]*)$ /group_album_file.php?group_id=$2&groupmedia_id=$3$4 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*/)?group/([0-9]+)/discussion/([0-9]+)/([^/]*)$ /group_discussion_view.php?group_id=$2&grouptopic_id=$3$4 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*/)?group/([0-9]+)/discussion/([0-9]+)/([0-9]+)/([^/]*)$ /group_discussion_view.php?group_id=$2&grouptopic_id=$3&grouppost_id=$4$5 [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/classifieds/([0-9]+)/?$ /classified.php?user=$1&classified_id=$2 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/classifieds/([0-9]+)/([^/]+)?$ /classified.php?user=$1&classified_id=$2$3 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/classifieds/?$ /classifieds.php?user=$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/blog/([0-9]+)/?$ /blog.php?user=$1&blogentry_id=$2 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/blog/([^/]+)?$ /blog.php?user=$1$2 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/blog/?$ /blog.php?user=$1 [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/trackback/([0-9]+)/?$ /blog_ajax.php?task=trackback&user=$1&blogentry_id=$2 [L]


RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/albums/([0-9]+)/([0-9]+)/?$ /album_file.php?user=$1&album_id=$2&media_id=$3 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/albums/([0-9]+)/?$ /album.php?user=$1&album_id=$2 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/albums/([0-9]+)/([^/]+)?$ /album.php?user=$1&album_id=$2$3 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/albums/?$ /albums.php?user=$1 [L]
 
Ну вот такие видел еще фишки.

Типа блочат эксплойты. Мож поможет.:-]
 
Статус
В этой теме нельзя размещать новые ответы.
Назад
Сверху