pinklep Posted May 5, 2008 Posted May 5, 2008 I need help with redirect/rewrite. I am trying to be clever! I have a SSL certificate for my website (call it abc.com). I want my parked domain, xyz.com to have abc.com in the address bar so the SSL certificate will be 'ok'. (If xyz.com is in the address bar, the javascript popup will say IDAuthority not available for this site.) Options +FollowSymLinks RewriteEngine on RewriteCond %{HTTP_HOST} ^xyz.com [NC] RewriteRule ^(.*)$ http://www.abc.com/$1 [L,R=301] I believe this would take care of the situation if someone enters xyz.com in the address bar. Is there a way to write this for www.xyz.com? Also, if I want www.abc.com to redirect to www.abc.com/store - can I use the above code but add /store? Or would I need to do the following type of redirect: RewriteCond %{HTTP_HOST} ^(www\.)?abc.com$ RewriteCond %{REQUEST_URI} !store/ RewriteRule ^(.*)$ store/$1 Or is this just wrong!? Thank you in advance! I am a Jedi, like my father before me!
pinklep Posted May 6, 2008 Author Posted May 6, 2008 I need help with redirect/rewrite. I am trying to be clever! I have a SSL certificate for my website (call it abc.com). I want my parked domain, xyz.com to have abc.com in the address bar so the SSL certificate will be 'ok'. (If xyz.com is in the address bar, the javascript popup will say IDAuthority not available for this site.) Options +FollowSymLinks RewriteEngine on RewriteCond %{HTTP_HOST} ^xyz.com [NC] RewriteRule ^(.*)$ http://www.abc.com/$1 [L,R=301] I believe this would take care of the situation if someone enters xyz.com in the address bar. Is there a way to write this for www.xyz.com? Also, if I want www.abc.com to redirect to www.abc.com/store - can I use the above code but add /store? Or would I need to do the following type of redirect: RewriteCond %{HTTP_HOST} ^(www\.)?abc.com$ RewriteCond %{REQUEST_URI} !store/ RewriteRule ^(.*)$ store/$1 Or is this just wrong!? Thank you in advance! Got it - The first step is an external redirect, the second is an internal rewrite. I am a Jedi, like my father before me!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.