[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ic] Mangling DirectoryIndex


On 12/06/2007 03:58 AM, Ton Verhagen wrote:
> Hi All,
> 
> Would it be possible to set the value of the DirectoryIndex config
> variable in an Actionmap?

You can certainly set the value, but I don't think it would do anything
at that point.

> I would like to serve a different entry page for different domains.
> 
> In the interchange.cfg I have got entries like:
> Catalog  mycat  alias           www.domain_1.com
> Catalog  mycat  alias           www.domain_2.com
> Catalog  mycat  alias           www.domain_3.com
> etc.
> 
> I test for a domain and set the $Config->{DirectoryIndex}  to a
> page name in an Actionmap.
> 
> For www.domain_1.com e.g.
>         $Config->{DirectoryIndex} = "index_1.html";
> 
> The $Config->{DirectoryIndex} is being set, but the page
> doesn't show up. The standard index.html is being served instead.
> 
> What could I be missing?

It's a chicken and egg problem, by the time the ActionMap is called the
page to display is already determined (and stored in
$CGI->{mv_nextpage}).  If you want to change that page simply set
$CGI->{mv_nextpage} to whatever you want and return 1 from your
ActionMap sub.

See <http://www.interchange.rtfm.info/icdocs/config/ActionMap.html> for
more info.

Peter

_______________________________________________
interchange-users mailing list
suppressed
http://www.icdevgroup.org/mailman/listinfo/interchange-users


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.