what I want to achive
prod.com to be immediately moved to prod.com/cms
when I did Redirect permanent / /cms
I got a lot of /cmscmscmscmscms etc. Any ideas?
my vhost
<VirtualHost *:443>
ServerName prod.com
DocumentRoot /home/www/sites/prod/html/development
<Directory /home/www/sites/prod/html/development>
AllowOverride All
</Directory>
SSLEngine on
SSLCACertificateFile /etc/pki/tls/certs/gd_bundle.crt
SSLCertificateFile /etc/pki/tls/certs/prod.crt
SSLCertificateKeyFile /etc/pki/tls/private/prod.key
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
BrowserMatch "MSIE [2-6]" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
</VirtualHost>
my .htaccess
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/API [NC]
RewriteRule ^(.*)$ /Application/API/api.php [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*)$ /Application/controller.php [L]
DirectoryIndex /Application/controller.php
The reason you got a redirect loop was because
Redirect / /cms
matches any path starting with / and appends the old path onto the new path. What you actually want is:This only matches /