[ic] Help On url Look

Mike Heins interchange-users@icdevgroup.org
Wed Jul 17 09:16:02 2002


Quoting Stefan Hornburg (Racke) (racke@linuxia.de):
> Joachim Leidinger <jojo@blackpoint.de> writes:
> 
> > Vijeeth Reddy wrote:
> > >  Hi,
> > >  I'd like to start having stores be like
> > 
> > >  http://www.yourdomain.com/index.html
> > 
> > >  http://www.yourdomain.com/ord/basket.html
> > >  instead of
> > >  http://www.yourdomain.com/cgi-bin/yourstore/index.html
> > >  http://www.yourdomain.com/cgi-bin/yourstore/ord/basket.html
> > > Can I Configure this???? If so please help me out.
> > 
> > > Thanks
> > 
> > > Vijeeth
> > 
> > 
> > 
> > http://interchange.redhat.com/pipermail/interchange-users/2000-December/003122.html
> 
> To avoid the rewrites, use:
> 
> - FullURL in interchange.cfg
> - Alias for _all_ static HTML
> - ScriptAliasMatch ^/(.+) /usr/lib/cgi-bin/yourstore
> 

Does this work? I don't think it should, for having no SCRIPT_NAME
component should stop IC in its tracks.

If you can get it to work, perhaps this is better:

ScriptAliasMatch ^/([^.]+)$      /usr/lib/cgi-bin/yourstore
ScriptAliasMatch ^/(.+\.html)$   /usr/lib/cgi-bin/yourstore

That will allow you to serve other types of content (like images) without
processing by IC.

I got a bit interested in this and verified it won't work. Then I added
this to the top of Vend::Server::map_misc_cgi:

	if($Global::Variable->{SCRIPT_REPLACE}) {
		$CGI::path_info = "$CGI::script_name$CGI::path_info";
		$CGI::script_name = $Global::Variable->{SCRIPT_REPLACE};
	}

Then when I went to these settings in interchange.cfg:

    FullURL  yes
    Catalog  found  /work/interchange/catalogs/found sam.heins.net/store
    Variable SCRIPT_REPLACE /store

I of course had to change the CGI_URL to blank (making VendURL be 
http://sam.heins.net).

Then it worked, and the images came through.

-- 
Mike Heins
Perusion -- Expert Interchange Consulting    http://www.perusion.com/
phone +1.513.523.7621      <mike@perusion.com>

I don't want to get to the end of my life and find I have just
lived the length of it. I want to have lived the width of it as
well. -- Diane Ackerman