Htaccess File

Hlkz/FluxBB/master/.htaccess

THE_REQUEST
Options +FollowSymLinks -MultiViews

RewriteEngine On
RewriteBase /

# Index
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}s/+index.php(.*) [NC]
RewriteRule ^ /? [R=301,L]
RewriteRule ^/?$ /index.php [QSA,NC,L]
#

# Game
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}s/+game.php(.*) [NC]
RewriteRule ^ /game? [R=301,L]
RewriteRule ^game?$ /site.php?id=2 [QSA,NC,L]
RewriteRule ^game/?$ /site.php?id=2 [QSA,NC,L]
#

# News
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}s/+news.php(.*) [NC]
RewriteRule ^ /news? [R=301,L]
RewriteRule ^news?$ /site.php?id=1 [QSA,NC,L]
RewriteRule ^news/?$ /site.php?id=1 [QSA,NC,L]
#

# Site
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}s/+site.php?id=([0-9]{1,})(.*) [NC]
RewriteRule ^ /site/page/%1? [R=301,L]
RewriteRule ^site/page/([0-9]{1,})?$ /site.php?id=$1 [QSA,NC,L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}s/+site.php?page=([0-9a-zA-Z%20()'-]{1,})(.*) [NC]
RewriteRule ^ /site/%1? [R=301,L]
RewriteRule ^site/([0-9a-zA-Z%20()'-]{1,})?$ /site.php?page=$1 [QSA,NC,L]
#

# Board
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}s/+b.php(.*) [NC]
RewriteRule ^ /board? [R=301,L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}s/+board.php(.*) [NC]
RewriteRule ^ /board? [R=301,L]
RewriteRule ^b?$ /b.php [QSA,NC,L]
RewriteRule ^b/?$ /b.php [QSA,NC,L]
RewriteRule ^board?$ /b.php [QSA,NC,L]
RewriteRule ^board/?$ /b.php [QSA,NC,L]
#

# Forum
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}s/+forum.php?id=([0-9]{1,})(.*) [NC]
RewriteRule ^ /board/forum-%1? [R=301,L]
RewriteRule ^board/forum-([0-9]{1,})?$ /forum.php?id=$1 [QSA,NC,L]
RewriteRule ^board/forum-([0-9]{1,})/?$ /forum.php?id=$1 [QSA,NC,L]
#

# Topic
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}s/+topic.php?id=([0-9]{1,})&p=([0-9]{1,})(.*) [NC]
RewriteRule ^ /board/topic-%1-%2? [R=301,L]
RewriteRule ^board/topic-([0-9]{1,})-([0-9]{1,})?$ /topic.php?id=$1&p=$2 [QSA,NC,L]
RewriteRule ^board/topic-([0-9]{1,})-([0-9]{1,})/?$ /topic.php?id=$1&p=2 [QSA,NC,L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}s/+topic.php?id=([0-9]{1,})(.*) [NC]
RewriteRule ^ /board/topic-%1? [R=301,L]
RewriteRule ^board/topic-([0-9]{1,})?$ /topic.php?id=$1 [QSA,NC,L]
RewriteRule ^board/topic-([0-9]{1,})/?$ /topic.php?id=$1 [QSA,NC,L]
#

# Post
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}s/+topic.php?pid=([0-9]{1,})#([0-9]{1,})(.*) [NC]
RewriteRule ^ /board/post-%1#%2? [R=301,L]
RewriteRule ^board/post-([0-9]{1,})-([0-9]{1,})?$ /topic.php?pid=$1#$2 [QSA,NC,L]
RewriteRule ^board/post-([0-9]{1,})-([0-9]{1,})/?$ /topic.php?pid=$1#2 [QSA,NC,L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}s/+topic.php?pid=([0-9]{1,})(.*) [NC]
RewriteRule ^ /board/post-%1? [R=301,L]
RewriteRule ^board/post-([0-9]{1,})?$ /topic.php?pid=$1 [QSA,NC,L]
RewriteRule ^board/post-([0-9]{1,})/?$ /topic.php?pid=$1 [QSA,NC,L]
#

# Database View
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}s/+view.php?table=([a-zA-Z_]{1,})&id=([0-9]{1,})(.*) [NC]
RewriteRule ^ /db/%1=%2? [R=301,L]
RewriteRule ^db/([a-zA-Z_]{1,})=([0-9]{1,})(.*)?$ /view.php?table=$1&id=$2 [QSA,NC,L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}s/+view.php?table=([a-zA-Z_]{1,})&name=([0-9a-zA-ZáâäãåçéèêëíìîïñóòôöõúùûüýÿæœÁÀÂÄÃÅÇÉÈÊËÍÌÎÏÑÓÒÔÖÕÚÙÛÜÝŸÆŒ ()']{1,})(.*) [NC]
RewriteRule ^ /db/%1-%2? [R=301,L]
RewriteRule ^db/([a-zA-Z_]{1,})-([0-9a-zA-ZáâäãåçéèêëíìîïñóòôöõúùûüýÿæœÁÀÂÄÃÅÇÉÈÊËÍÌÎÏÑÓÒÔÖÕÚÙÛÜÝŸÆŒ ()']+)?$ /view.php?table=$1&name=$2 [QSA,NC,L]
#

# Database
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}s/+database.php?table=([a-zA-Z_]{1,})(.*) [NC]
RewriteRule ^ /db/%1? [R=301,L]
RewriteRule ^db/([a-zA-Z_]{1,})?$ /database.php?table=$1 [QSA,NC,L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}s/+database.php [NC]
RewriteRule ^ /db? [R=301,L]
RewriteRule ^db?$ /database.php [QSA,NC,L]
RewriteRule ^db/?$ /database.php [QSA,NC,L]
#

# Database Edit
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}s/+editor.php?table=([a-zA-Z_]{1,})&id=([0-9]{1,})(.*) [NC]
RewriteRule ^ /edit/%1=%2? [R=301,L]
RewriteRule ^edit/([a-zA-Z_]{1,})=([0-9]{1,})(.*)?$ /editor.php?table=$1&id=$2 [QSA,NC,L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}s/+editor.php?table=([a-zA-Z_]{1,})&name=([0-9a-zA-ZáâäãåçéèêëíìîïñóòôöõúùûüýÿæœÁÀÂÄÃÅÇÉÈÊËÍÌÎÏÑÓÒÔÖÕÚÙÛÜÝŸÆŒ ()']{1,})(.*) [NC]
RewriteRule ^ /edit/%1-%2? [R=301,L]
RewriteRule ^edit/([a-zA-Z_]{1,})-([0-9a-zA-ZáâäãåçéèêëíìîïñóòôöõúùûüýÿæœÁÀÂÄÃÅÇÉÈÊËÍÌÎÏÑÓÒÔÖÕÚÙÛÜÝŸÆŒ ()']+)?$ /editor.php?table=$1&name=$2 [QSA,NC,L]
#
Exit mobile version