ams123
06-28-2007, 03:10 AM
We have this .htaccess file in https://mysecure.net/companydomain.co.uk:
RewriteEngine On
RewriteBase /companydomain.co.uk/
# if .en can be other values then use this rule
RewriteRule ^(.*)/(.*)\.([^&]+)$ $1/$2.$3 [L]
RewriteCond %{QUERY_STRING} ^([^=]+)=([^&]+)&(.*)=([^&]+)&(.*)=([^&]+)&(.*)=([^&]+)
RewriteRule ^(.*)\.([^&]+)$ index.php5?page=$1&fileextension=$2&%1=%2&%3=%4&%5=%6&%7=%8 [L]
RewriteCond %{QUERY_STRING} ^([^=]+)=([^&]+)&(.*)=([^&]+)&(.*)=([^&]+)
RewriteRule ^(.*)\.([^&]+)$ index.php5?page=$1&fileextension=$2&%1=%2&%3=%4&%5=%6 [L]
RewriteCond %{QUERY_STRING} ^([^=]+)=([^&]+)&(.*)=([^&]+)
RewriteRule ^(.*)\.([^&]+)$ index.php5?page=$1&fileextension=$2&%1=%2&%3=%4 [L]
RewriteCond %{QUERY_STRING} ^([^=]+)=([^&]+)
RewriteRule ^(.*)\.([^&]+)$ index.php5?page=$1&fileextension=$2&%1=%2 [L]
RewriteRule ^([^&]+)\.([^&]+)$ index.php5?page=$1&fileextension=$2 [L]
We have this .htaccess file in https://mysecure.net/cms:
RewriteEngine On
RewriteBase /cms/
# if .en can be other values then use this rule
RewriteRule ^(.*)/(.*)\.([^&]+)$ $1/$2.$3 [L]
RewriteCond %{QUERY_STRING} ^([^=]+)=([^&]+)&(.*)=([^&]+)&(.*)=([^&]+)&(.*)=([^&]+)
RewriteRule ^(.*)\.([^&]+)$ index.php5?page=$1&language=$2&%1=%2&%3=%4&%5=%6&%7=%8 [L]
RewriteCond %{QUERY_STRING} ^([^=]+)=([^&]+)&(.*)=([^&]+)&(.*)=([^&]+)
RewriteRule ^(.*)\.([^&]+)$ index.php5?page=$1&language=$2&%1=%2&%3=%4&%5=%6 [L]
RewriteCond %{QUERY_STRING} ^([^=]+)=([^&]+)&(.*)=([^&]+)
RewriteRule ^(.*)\.([^&]+)$ index.php5?page=$1&language=$2&%1=%2&%3=%4 [L]
RewriteCond %{QUERY_STRING} ^([^=]+)=([^&]+)
RewriteRule ^(.*)\.([^&]+)$ index.php5?page=$1&language=$2&%1=%2 [L]
RewriteRule ^([^&]+)\.([^&]+)$ index.php5?page=$1&language=$2 [L]
The code is basically the same in both directories (except for the rewrite base and one variable name). Now we just need some extra code to convert http to https.
RewriteEngine On
RewriteBase /companydomain.co.uk/
# if .en can be other values then use this rule
RewriteRule ^(.*)/(.*)\.([^&]+)$ $1/$2.$3 [L]
RewriteCond %{QUERY_STRING} ^([^=]+)=([^&]+)&(.*)=([^&]+)&(.*)=([^&]+)&(.*)=([^&]+)
RewriteRule ^(.*)\.([^&]+)$ index.php5?page=$1&fileextension=$2&%1=%2&%3=%4&%5=%6&%7=%8 [L]
RewriteCond %{QUERY_STRING} ^([^=]+)=([^&]+)&(.*)=([^&]+)&(.*)=([^&]+)
RewriteRule ^(.*)\.([^&]+)$ index.php5?page=$1&fileextension=$2&%1=%2&%3=%4&%5=%6 [L]
RewriteCond %{QUERY_STRING} ^([^=]+)=([^&]+)&(.*)=([^&]+)
RewriteRule ^(.*)\.([^&]+)$ index.php5?page=$1&fileextension=$2&%1=%2&%3=%4 [L]
RewriteCond %{QUERY_STRING} ^([^=]+)=([^&]+)
RewriteRule ^(.*)\.([^&]+)$ index.php5?page=$1&fileextension=$2&%1=%2 [L]
RewriteRule ^([^&]+)\.([^&]+)$ index.php5?page=$1&fileextension=$2 [L]
We have this .htaccess file in https://mysecure.net/cms:
RewriteEngine On
RewriteBase /cms/
# if .en can be other values then use this rule
RewriteRule ^(.*)/(.*)\.([^&]+)$ $1/$2.$3 [L]
RewriteCond %{QUERY_STRING} ^([^=]+)=([^&]+)&(.*)=([^&]+)&(.*)=([^&]+)&(.*)=([^&]+)
RewriteRule ^(.*)\.([^&]+)$ index.php5?page=$1&language=$2&%1=%2&%3=%4&%5=%6&%7=%8 [L]
RewriteCond %{QUERY_STRING} ^([^=]+)=([^&]+)&(.*)=([^&]+)&(.*)=([^&]+)
RewriteRule ^(.*)\.([^&]+)$ index.php5?page=$1&language=$2&%1=%2&%3=%4&%5=%6 [L]
RewriteCond %{QUERY_STRING} ^([^=]+)=([^&]+)&(.*)=([^&]+)
RewriteRule ^(.*)\.([^&]+)$ index.php5?page=$1&language=$2&%1=%2&%3=%4 [L]
RewriteCond %{QUERY_STRING} ^([^=]+)=([^&]+)
RewriteRule ^(.*)\.([^&]+)$ index.php5?page=$1&language=$2&%1=%2 [L]
RewriteRule ^([^&]+)\.([^&]+)$ index.php5?page=$1&language=$2 [L]
The code is basically the same in both directories (except for the rewrite base and one variable name). Now we just need some extra code to convert http to https.