Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .htaccess file:
- php_flag display_errors off
- # This controls what config options to use.
- # SetEnv RELEASE_MODE DEV
- RewriteEngine On
- http://reim.altervista.org = /
- # These are the real folders.
- RewriteRule ^resources/(.*)$ resources/$1 [L]
- RewriteRule ^docs/(.*)$ docs/$1 [L]
- # Specific, prettier URLs.
- RewriteRule ^profile/([0-9]+) index.php?page_slug=profile&user_id=$1 [NC,L]
- RewriteRule ^pet/([0-9]+) index.php?page_slug=pet&pet_id=$1 [NC,L]
- RewriteRule ^edit-pet/([0-9]+) index.php?page_slug=edit-pet&pet_id=$1 [NC,L]
- RewriteRule ^shop/([0-9]+) index.php?page_slug=shop&shop_id=$1 [NC,L]
- RewriteRule ^notice/([0-9]+) index.php?page_slug=notice&state=jump¬ification_id=$1 [NC,L]
- # Pagination for /items/ - /items is still handled by the catch-all, etc.
- RewriteRule ^items/([0-9]+) index.php?page_slug=items&page=$1 [NC,L]
- RewriteRule ^news/([0-9]+) index.php?page_slug=news&page=$1 [NC,L]
- RewriteRule ^crafting/([0-9]+) index.php?page_slug=crafting&page=$1 [NC,L]
- # Messages - first pagination. Then we have two URLs mapped to our write-new
- # slug - /write-new-message/ and /write-message-reply/. -new accepts a user ID,
- # and -reply takes a message ID. Slick.
- RewriteRule ^messages/([0-9]+) index.php?page_slug=messages&page=$1 [NC,L]
- RewriteRule ^write-new-message(/([0-9]+))? index.php?page_slug=write-message&to_user_id=$2 [NC,L]
- RewriteRule ^write-message-reply(/([0-9]+))?(/(all))? index.php?page_slug=write-message&reply_to_id=$2&reply_to_all=$4 [NC,L]
- RewriteRule ^message/([0-9]+) index.php?page_slug=message&message_id=$1 [NC,L]
- # The boards need to support both a 'nice' URL (/thread/1) AND a page number
- # on that URL (/thread/1/2/).
- RewriteRule ^threads/([0-9]+)(/([0-9]+))? index.php?page_slug=threads&board_id=$1&page=$3 [NC,L]
- RewriteRule ^thread/([0-9]+)(/([0-9]+))? index.php?page_slug=thread&thread_id=$1&page=$3 [NC,L]
- RewriteRule ^edit-post/([0-9]+)(/([0-9]+))? index.php?page_slug=edit-post&post_id=$1&page=$3 [NC,L]
- RewriteRule ^edit-thread/([0-9]+)(/([0-9]+))? index.php?page_slug=edit-thread&thread_id=$1&page=$3 [NC,L]
- # Search page rules.
- RewriteRule ^search/([a-z0-9]+)(((/([^/]+))(/(exact|contains)?)(/([0-9])+)?))? index.php?page_slug=search&state=search&search=$1&term=$5&page=$9&precision=$7 [NC,L]
- # Craft things.
- RewriteRule ^craft/([0-9]+) index.php?page_slug=craft&id=$1 [NC,L]
- # Gotta catch 'em all! Don't put any rules below this one.
- RewriteRule ^([A-Z0-9-]+)(/(.*))?$ index.php?page_slug=$1 [QSA,NC,L]
- ----------------------------------
- My apache directives in AlterVista for the .htaccess file:
- RewriteEngine On
- RewriteBase /
- RewriteCond %{REQUEST_FILENAME} !-f
- RewriteCond %{REQUEST_FILENAME} !-d
- RewriteCond %{REQUEST_URI} !\.(js|css|gif|jpg|png|ico)$ [NC]
- RewriteRule ^(.*)$ index.php [QSA,L]
- RewriteRule ^get/([0-9]+).gif$ /click/siggy/$1 [L]
- # # av:php5-engine
- AddHandler av-php56 .php
- php_flag display_errors off
- # # av:Toolbar
- SetEnv AV_TOOLBAR 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement