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
|
# pages via Apache with mod_rewrite to use this functionality, and you must
# change the file name from ht.access to .htaccess.
#
# Make sure RewriteBase points to the directory where you installed MODX.
# E.g., "/modx" if your installation is in a "modx" subdirectory.
#
# You may choose to make your URLs non-case-sensitive by adding a NC directive
# to your rule: RewriteRule ^(.*)$ index.php?q=$1 [L,QSA,NC]
RewriteEngine On
RewriteBase /site/
# Rewrite <a href="http://www.domain.com" target="_blank">www.domain.com</a> -> domain.com -- used with SEO Strict URLs plugin
#RewriteCond %{HTTP_HOST} .
#RewriteCond %{HTTP_HOST} !^example-domain-please-change\.com [NC]
#RewriteRule (.*) http://example-domain-please-change.com/$1 [R=301,L]
#
# or for the opposite domain.com -> <a href="http://www.domain.com" target="_blank">www.domain.com</a> use the following
# DO NOT USE BOTH
#
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^www\.domaine\.net/site [NC]
RewriteRule (.*) http://www.domaine.net/site/$1 [R=301,L] |
Partager