Jun. 13th, 2010
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
I have been working on bug-1059,i.ebugs.dwscoalition.org/show_bug.cgi . I submitted a patch on 2.06.2010. But there was some problem with that. It failed to redirect shop.dreamwidth.org/<something> to dreamwidth.org/shop/<something>. Now I am trying to fix this. I made an entry in the %LJ::SUBDOMAIN_FUNCTION defined in the /etc/config.pl similar to the one which is done for cssproxy. Then in dw/cgi-bin/Apache/LiveJournal.pm, I entered this code,
} elsif ($func eq 'support') {
I understood that this is not correct, But my intention was that in this case, $1 will contain shop.dreamwidth.org and $2 will contain <something> and this is not working, instead it is redirecting both shop.dreamwidth.org and shop.dreamwidth.org/something to dreamwidth.org/shop. I'm not sure what I have done is correct. Please give some suggestions so that I can make it work. I could very well be wrong.
} elsif ($func eq 'support') {
return redir($r, "$LJ::SITEROOT/support/");
} elsif ($func eq "shop") {
if($host =~ m!^(\w|\.)+/([\w\-]{1,25})$!) {
return redir($r, "$LJ::SITEROOT/shop/$2");
} else {
return redir($r, "$LJ::SITEROOT/shop");
}
} elsif (ref $func eq "ARRAY" && $func->[0] eq "changehost") {
I understood that this is not correct, But my intention was that in this case, $1 will contain shop.dreamwidth.org and $2 will contain <something> and this is not working, instead it is redirecting both shop.dreamwidth.org and shop.dreamwidth.org/something to dreamwidth.org/shop. I'm not sure what I have done is correct. Please give some suggestions so that I can make it work. I could very well be wrong.