LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   Redirection rules for "redirect URL" identifier (http://www.linuxquestions.org/questions/linux-general-1/redirection-rules-for-redirect-url-identifier-783433/)

riteshanand40 01-20-2010 04:06 AM

Redirection rules for "redirect URL" identifier
 
Hi,

I need to redirect https://abcd.com to https://pqrs.com.
I achieved this by adding
RewriteRule ^/$ https://pqrs.com/ [R]

on the ssl.conf of abcd.com.

But when it gets
_https://abcd.com/xx/xx/xxxxxxxxxx/xxxx&redirectUrl=https://abcd.com/xx/xx/xxxxxxxxxx/xxxx
it redirects it to
_https://pqrs.com/xx/xx/xxxxxxxxxx/xxxx&redirectUrl=https://abcd.com/xx/xx/xxxxxxxxxx/xxxx

means it's not redirecting with identifier "redirectUrl=".

How to rewrite to that as well ??

Regards,
Ritesh Anand

bathory 01-20-2010 08:30 AM

Hi,

Quote:

means it's not redirecting with identifier "redirectUrl=".

How to rewrite to that as well ??
What you mean by that? You want your URL rewritten to: https://pqrs.com/xx/xx/xxxxxxxxxx/xx...xxxxxxxxx/xxxx

If that's the case, you can try the following:
RewriteEngine on

RewriteCond %{HTTP_HOST} !^pqrs.com$
RewriteRule (.*) https://pqrs.com/$1 [R]
RewriteCond %{HTTP_HOST} ^www.semltd.com.cy$
RewriteRule ^xx/(.*)abcd.com(.*)$ /xx/$1/pqrs.com$2 [R,L]
Regards


All times are GMT -5. The time now is 05:05 PM.