Hi all,
I have an add-on domain that I’m trying to redirect to an EE-URL (domain.com/template_group/template) but for some reason it seems to be stripping out part of the URL.
In the .htaccess file for the add-on domain, I have the following:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^domain.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.domain.com$
RewriteRule ^/?$ "http\:\/\/www\.seconddomain\.com/proyectos/citymall" [R=301,L]
but the URL I get forwarded to is: http://www.seconddomain.com/citymall
My .htaccess for seconddomain.com contains:
RewriteEngine On
# Redirect non-www urls to www
RewriteCond %{HTTP_HOST} !^www\.seconddomain\.com
RewriteRule (.*) <a href="http://www.seconddomain.com/$1">http://www.seconddomain.com/$1</a> [R=301,L]
#Send Proper 404 Headers
ErrorDocument 404 /index.php/site/404/
# Simple 404 for missing files
<FilesMatch "(\.jpe?g|gif|png|bmp)$">
ErrorDocument 404 /index.php/site/404/
</FilesMatch>
# Remove index.php from URLs (Include Method)
RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5})$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond $1 ^(member|site|search|default|quienes_somos|proyectos|carreras|arrendamiento|contacto|directorios_tiendas|eventos_tiendas|localizaciones|mas_propiedades|promociones_tiendas|citas|misc|P[0-9]{2,8}) [NC]
RewriteRule ^(.*)$ /index.php?/$1 [L]
Anyone have an idea of why this is happening? I’m still learning the basics of mod_rewrite and regex. Thanks!