You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Scott Chapman <sc...@mischko.com> on 2002/07/15 23:42:54 UTC

web site structure quesiton

I have a web site with EmbPerl where URLS are into specific directories 
(unique directories are created for each user and the pages are currently 
symlinked into the directories and accessed there).  I am changing the site 
so that the only thing stored in the unique directories is the data for each 
user (that isn't going into the database).  I want to make it so that the 
current URL format is maintained if possible:

currently:
http://website/subdir/UNIQUEDIR/page.epl

I don't want the page.epl to be in that directory any more but I want the web 
site to redirect all such pages to a page.epl with the UNIQUEDIR as a 
parameter.

Is this possible?

TIA,
Scott

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: web site structure quesiton

Posted by Aaron Johnson <so...@gina.net>.
Scott,

I would be concerned by the fact that the user data would be under a web
directory and exposed.  What type of information would be in the files
and would it be difficult to load them from a location outside of the
main web directory structure?

You could possibly use the Embperl::Object (2.x) HTML::EmbperlObject
(1.3.x) and have the 'base' page load the user information for you
automatically from a per defined directory.

You didn't state if it is minimal information that is going to be
stored, why couldn't/shouldn't it be included in the database?

Aaron

On Mon, 2002-07-15 at 17:42, Scott Chapman wrote:
> I have a web site with EmbPerl where URLS are into specific directories 
> (unique directories are created for each user and the pages are currently 
> symlinked into the directories and accessed there).  I am changing the site 
> so that the only thing stored in the unique directories is the data for each 
> user (that isn't going into the database).  I want to make it so that the 
> current URL format is maintained if possible:
> 
> currently:
> http://website/subdir/UNIQUEDIR/page.epl
> 
> I don't want the page.epl to be in that directory any more but I want the web 
> site to redirect all such pages to a page.epl with the UNIQUEDIR as a 
> parameter.
> 
> Is this possible?
> 
> TIA,
> Scott
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> For additional commands, e-mail: embperl-help@perl.apache.org
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: web site structure quesiton

Posted by Axel Beckert - ecos gmbh <be...@ecos.de>.
Hi!

On Mon, Jul 15, 2002 at 02:42:54PM -0700, Scott Chapman wrote:
> I have a web site with EmbPerl where URLS are into specific directories 
> (unique directories are created for each user and the pages are currently 
> symlinked into the directories and accessed there).

First let me say that I agree to Aaaron regarding his comment on
security respective privacy concerns.

> I want to make it so that the current URL format is maintained if
> possible:

> currently:
> http://website/subdir/UNIQUEDIR/page.epl

> I don't want the page.epl to be in that directory any more but I want the web 
> site to redirect all such pages to a page.epl with the UNIQUEDIR as a 
> parameter.
> 
> Is this possible?

Of course this is possible. If your're unique id follows a syntax,
which no other directory has, you can use the Apache directives Alias
or AliasMatch from mod_alias (a default compiled in apache standard
module). Or you use mod_rewrite (a non-default apache standard
module), if it's a little bit trickier or if you want to check if
those unique id directory which is requested really exists.

Do something like

  AliasMatch /subdir/(regexp-for-uniquedir)/page.epl /path/to/htdocs/subdir/page.epl

This should be similiar to the often used vice versa case, where files
are aliased into a lot of non-existing (short said virtual)
directories.

In mod_rewrite this should look something like this (the second line
gets evaluated first!):

  # Only remap file if directory exists,
  RewriteCond /path/to/htdocs/$1$2 -d

  # Only remap file if file exists,
  RewriteCond /path/to/htdocs/$1page.epl -f

  # Remap page.epl to ../page.epl in uniqui-id-directories
  RewriteRule ^/(subdir/)(regexp-for-uniquedir)/page\.epl(?.*)?$ /$1page.epl$3

(Untested, so no guaranties... :-)

            Kind regards, Axel Beckert
-- 
-------------------------------------------------------------
Axel Beckert      ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
E-Mail:     beckert@ecos.de         Voice:    +49 6133 926530
WWW:        http://www.ecos.de/     Fax:      +49 6133 925152
-------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: web site structure quesiton

Posted by Tiago Stock <ts...@tiago.com>.
I would look into mod_rewrite for this.

Tiago Stock
--


On Mon, 15 Jul 2002, Scott Chapman wrote:

> I have a web site with EmbPerl where URLS are into specific directories
> (unique directories are created for each user and the pages are currently
> symlinked into the directories and accessed there).  I am changing the site
> so that the only thing stored in the unique directories is the data for each
> user (that isn't going into the database).  I want to make it so that the
> current URL format is maintained if possible:
>
> currently:
> http://website/subdir/UNIQUEDIR/page.epl
>
> I don't want the page.epl to be in that directory any more but I want the web
> site to redirect all such pages to a page.epl with the UNIQUEDIR as a
> parameter.
>
> Is this possible?
>
> TIA,
> Scott
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> For additional commands, e-mail: embperl-help@perl.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org