laxxen/friendchat/master/.htaccess - Htaccess File

laxxen/friendchat/master/.htaccess

#to catalog travel
Options -Indexes

#url_rewrite on
RewriteEngine on

#file to work with
RewriteCond %{REQUEST_URI} ^/index.php$

#första $_GET['page']
RewriteCond %{QUERY_STRING} !marker
RewriteCond %{QUERY_STRING} !action
RewriteCond %{QUERY_STRING} page=([A-Za-z0-9]+)
RewriteRule ^/?index.php$ /%1/? [R=301,L]
RewriteRule ^/?([A-Za-z0-9]+)/?$ /index.php?marker&page=$1 [L]

#andra $_GET['page'] och $_GET['action']
RewriteCond %{QUERY_STRING} !marker
RewriteCond %{QUERY_STRING} !action
RewriteCond %{QUERY_STRING} page=([A-Za-z0-9]+)
RewriteCond %{QUERY_STRING} action=([A-Za-z0-9]+)
RewriteRule ^/?index.php$ /%1/%2/? [R=301,L]
RewriteRule ^/?([A-Za-z0-9]+)/([A-Za-z0-9]+)/?$ /index.php?marker&page=$1&action=$2 [L]

#tredje level $_GET['page'], $_GET['action'] och $_GET['ID']
RewriteCond %{QUERY_STRING} !marker
RewriteCond %{QUERY_STRING} !action
RewriteCond %{QUERY_STRING} page=([A-Za-z0-9]+)
RewriteCond %{QUERY_STRING} action=([A-Za-z0-9]+)
RewriteCond %{QUERY_STRING} ID=([0-9]+)
RewriteRule ^/?index.php$ /%1/%2/%3/? [R=301,L]
RewriteRule ^/?([A-Za-z0-9]+)/([A-Za-z0-9]+)/([0-9]+)/?$ /index.php?marker&page=$1&action=$2&ID=$3 [L]

On Github License

Files

Download PDF of Htaccess file
GET, QUERY_STRING, REQUEST_URI

Comments

Apache