1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
|
#
# General options
#
Options +FollowSymlinks
RewriteEngine on
RewriteBase /
#
# Redirect www.42ndart.com, 42ndart.com and www.42ndart.org to 42ndart.org
#
RewriteCond %{HTTP_HOST} ^www\.42ndart\.org$ [NC,OR]
RewriteCond %{HTTP_HOST} ^www\.42ndart\.com$ [NC,OR]
RewriteCond %{HTTP_HOST} ^42ndart\.com$ [NC]
RewriteRule ^(.*)$ http://42ndart.org/$1 [R=301,QSA]
#
# Don't go further if the requested file exists
#
RewriteCond %{REQUEST_FILENAME} -f
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule . - [L]
#
# Redirect 42ndart.org to 42ndart.org/scalpel/
#
RewriteRule ^$ scalpel/$1 [R=301,L]
#
# Rewrite to the cms root folder
#
# Rewrite empty requests to the cms root folder
RewriteRule ^scalpel$ joomla/ [L]
# Replace scalpel by joomla
RewriteRule ^scalpel/(.*)$ joomla/$1
# Rewrite /joomla/xxx.html to /joomla/index.php/xxx.html
RewriteCond %{REQUEST_URI} ^/joomla/
RewriteCond %{REQUEST_URI} !^/joomla/index.php
RewriteRule ^joomla/(.+).html$ joomla/index.php/$1.html
# Rewrite /joomla/index.php/xxx_y.html to /joomla/index.php/xxx.html?page=y (where y is an integer)
RewriteCond %{REQUEST_URI} ^/joomla/index.php
RewriteCond %{REQUEST_URI} _[0-9]+.html$
RewriteRule ^joomla/index.php/(.+)_([0-9]+).html$ joomla/index.php/$1.html?page=$2 |
Partager