Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

Newbie: how to do this rewrite

 
   Web Hosting and Web Master Forums (Home) -> Webmaster RSS
Next:  Looking for a PHPBB Skin Designer  
Author Message
rchin2

External


Since: Jun 17, 2004
Posts: 4



(Msg. 1) Posted: Thu Jun 17, 2004 6:24 pm
Post subject: Newbie: how to do this rewrite
Archived from groups: alt>www>webmaster (more info?)

Apache1.3/Linux

how is the RewriteRule for :

www.hello.com/users/robert/some_cgi_call

to

www.hello.com/users/some_cgi_call

thanks

 >> Stay informed about: Newbie: how to do this rewrite 
Back to top
Login to vote
spam19

External


Since: May 08, 2004
Posts: 952



(Msg. 2) Posted: Thu Jun 17, 2004 6:38 pm
Post subject: Re: Newbie: how to do this rewrite [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Thu, 17 Jun 2004 15:24:18 -0400, Robert <rchin.RemoveThis@spammenot_panix.com>
wrote:

 >
 > Apache1.3/Linux
 >
 > how is the RewriteRule for :
 >
<font color=purple> > <a style='text-decoration: underline;' href="http://www.hello.com/users/robert/some_cgi_call</font" target="_blank">www.hello.com/users/robert/some_cgi_call</font</a>>
 >
 > to
 >
<font color=purple> > <a style='text-decoration: underline;' href="http://www.hello.com/users/some_cgi_call</font" target="_blank">www.hello.com/users/some_cgi_call</font</a>>
 >
 > thanks

To direct all files to /users:

Alias /users/robert /users

If you want just files ending in .cgi then by 301 redirect:

RedirectMatch 301 ^/users/robert/([^/]+)\.cgi
<a style='text-decoration: underline;' href="http://www.hello.com/users/$1.cgi" target="_blank">http://www.hello.com/users/$1.cgi</a>

And by transparent rewrite:

RewriteEngine On
RewriteRule ^users/robert/([^/]+)\.cgi users/$1.cgi [L]

Grey

--
The technical axiom that nothing is impossible sinisterly implies the
pitfall corollary that nothing is ridiculous.
- <a style='text-decoration: underline;' href="http://www.greywyvern.com/webslavent.php?msg=53" target="_blank">http://www.greywyvern.com/webslavent.php?msg=53</a> - Support the Opera
Puffin Mascot Campaign!<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: Newbie: how to do this rewrite 
Back to top
Login to vote
user94

External


Since: Sep 14, 2004
Posts: 2384



(Msg. 3) Posted: Fri Jun 18, 2004 1:31 am
Post subject: Re: Newbie: how to do this rewrite [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Back to top
Login to vote
user387

External


Since: Feb 13, 2004
Posts: 1055



(Msg. 4) Posted: Fri Jun 18, 2004 2:03 am
Post subject: Re: Newbie: how to do this rewrite [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Charles Sweeney wrote:

 > These X-Faces are all the rage now!

Yep, and Grey's looks a bit like a hologram to me, pretty neat
Smile

--
Els
<a style='text-decoration: underline;' href="http://locusmeus.com/" target="_blank">http://locusmeus.com/</a>
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Newbie: how to do this rewrite 
Back to top
Login to vote
user94

External


Since: Sep 14, 2004
Posts: 2384



(Msg. 5) Posted: Fri Jun 18, 2004 2:26 am
Post subject: Re: Newbie: how to do this rewrite [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Els wrote:

 > Charles Sweeney wrote:
 >
  >> These X-Faces are all the rage now!
 >
 > Yep, and Grey's looks a bit like a hologram to me, pretty neat
 >Smile

Yeh, Grey's clever that way.

--
Charles Sweeney
<a style='text-decoration: underline;' href="http://CharlesSweeney.com" target="_blank">http://CharlesSweeney.com</a><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Newbie: how to do this rewrite 
Back to top
Login to vote
nospamnono

External


Since: Jun 09, 2004
Posts: 14



(Msg. 6) Posted: Fri Jun 18, 2004 12:04 pm
Post subject: Re: Newbie: how to do this rewrite [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

so how would you ReWrite a cgi bin for all users on a server?

<a style='text-decoration: underline;' href="http://www.domain.com/cgi-bin" target="_blank">www.domain.com/cgi-bin</a>
<a style='text-decoration: underline;' href="http://www.123.com/cgi-bin" target="_blank">www.123.com/cgi-bin</a>

resolving to

/domain/www/cgi-bin/
/123/www/cgi-bin/

and have this working as a CGI-BIN


Cheers!



"GreyWyvern" <spam RemoveThis @greywyvern.com> wrote in message
news:opr9q7hrxosl6xfd@news.nas.net...
 > On Thu, 17 Jun 2004 15:24:18 -0400, Robert <rchin RemoveThis @spammenot_panix.com>
 > wrote:
 >
  > >
  > > Apache1.3/Linux
  > >
  > > how is the RewriteRule for :
  > >
<font color=green>  > > <a style='text-decoration: underline;' href="http://www.hello.com/users/robert/some_cgi_call</font" target="_blank">www.hello.com/users/robert/some_cgi_call</font</a>>
  > >
  > > to
  > >
<font color=green>  > > <a style='text-decoration: underline;' href="http://www.hello.com/users/some_cgi_call</font" target="_blank">www.hello.com/users/some_cgi_call</font</a>>
  > >
  > > thanks
 >
 > To direct all files to /users:
 >
 > Alias /users/robert /users
 >
 > If you want just files ending in .cgi then by 301 redirect:
 >
 > RedirectMatch 301 ^/users/robert/([^/]+)\.cgi
<font color=purple> > <a style='text-decoration: underline;' href="http://www.hello.com/users/$1.cgi</font" target="_blank">http://www.hello.com/users/$1.cgi</font</a>>
 >
 > And by transparent rewrite:
 >
 > RewriteEngine On
 > RewriteRule ^users/robert/([^/]+)\.cgi users/$1.cgi [L]
 >
 > Grey
 >
 > --
 > The technical axiom that nothing is impossible sinisterly implies the
 > pitfall corollary that nothing is ridiculous.
 > - <a style='text-decoration: underline;' href="http://www.greywyvern.com/webslavent.php?msg=53" target="_blank">http://www.greywyvern.com/webslavent.php?msg=53</a> - Support the Opera
 > Puffin Mascot Campaign!<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Newbie: how to do this rewrite 
Back to top
Login to vote
spam19

External


Since: May 08, 2004
Posts: 952



(Msg. 7) Posted: Fri Jun 18, 2004 12:10 pm
Post subject: Re: Newbie: how to do this rewrite [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Fri, 18 Jun 2004 09:04:08 +0100, Designer <nospamnono.DeleteThis@hotmail.com>
wrote:

 >
 > so how would you ReWrite a cgi bin for all users on a server?
 >
<font color=purple> > <a style='text-decoration: underline;' href="http://www.domain.com/cgi-bin</font" target="_blank">www.domain.com/cgi-bin</font</a>>
<font color=purple> > <a style='text-decoration: underline;' href="http://www.123.com/cgi-bin</font" target="_blank">www.123.com/cgi-bin</font</a>>
 >
 > resolving to
 >
 > /domain/www/cgi-bin/
 > /123/www/cgi-bin/
 >
 > and have this working as a CGI-BIN

In the httpd.conf file, something like:

ScriptAlias /cgi-bin/ /domain/www/cgi-bin/

ScriptAlias /cgi-bin/ /123/www/cgi-bin/

You'll need one for each domain definition you have, but there's probably
a better way. I'm more keen on .htaccess, but you can't burrow into the
filesystem with those.

You'll have to hope for one of the resident CGI experts here to speak up
since I abandoned CGI for PHP a long time ago.

Grey

--
The technical axiom that nothing is impossible sinisterly implies the
pitfall corollary that nothing is ridiculous.
- <a style='text-decoration: underline;' href="http://www.greywyvern.com/webslavent.php?msg=53" target="_blank">http://www.greywyvern.com/webslavent.php?msg=53</a> - Support the Opera
Puffin Mascot Campaign!<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Newbie: how to do this rewrite 
Back to top
Login to vote
nospamnono

External


Since: Jun 09, 2004
Posts: 14



(Msg. 8) Posted: Fri Jun 18, 2004 5:36 pm
Post subject: Re: Newbie: how to do this rewrite [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

With it being Mass Hosts with a Rewrite for the host mod, then a rewrite
would be a better answer I am sure.

Writing a script alias for each domain would take a lifetime!!!



"GreyWyvern" <spam.RemoveThis@greywyvern.com> wrote in message
news:opr9sj8bprsl6xfd@news.nas.net...
 > On Fri, 18 Jun 2004 09:04:08 +0100, Designer <nospamnono.RemoveThis@hotmail.com>
 > wrote:
 >
  > >
  > > so how would you ReWrite a cgi bin for all users on a server?
  > >
<font color=green>  > > <a style='text-decoration: underline;' href="http://www.domain.com/cgi-bin</font" target="_blank">www.domain.com/cgi-bin</font</a>>
<font color=green>  > > <a style='text-decoration: underline;' href="http://www.123.com/cgi-bin</font" target="_blank">www.123.com/cgi-bin</font</a>>
  > >
  > > resolving to
  > >
  > > /domain/www/cgi-bin/
  > > /123/www/cgi-bin/
  > >
  > > and have this working as a CGI-BIN
 >
 > In the httpd.conf file, something like:
 >
 > ScriptAlias /cgi-bin/ /domain/www/cgi-bin/
 >
 > ScriptAlias /cgi-bin/ /123/www/cgi-bin/
 >
 > You'll need one for each domain definition you have, but there's probably
 > a better way. I'm more keen on .htaccess, but you can't burrow into the
 > filesystem with those.
 >
 > You'll have to hope for one of the resident CGI experts here to speak up
 > since I abandoned CGI for PHP a long time ago.
 >
 > Grey
 >
 > --
 > The technical axiom that nothing is impossible sinisterly implies the
 > pitfall corollary that nothing is ridiculous.
 > - <a style='text-decoration: underline;' href="http://www.greywyvern.com/webslavent.php?msg=53" target="_blank">http://www.greywyvern.com/webslavent.php?msg=53</a> - Support the Opera
 > Puffin Mascot Campaign!<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Newbie: how to do this rewrite 
Back to top
Login to vote
who

External


Since: Apr 29, 2004
Posts: 1010



(Msg. 9) Posted: Sat Jun 19, 2004 2:08 pm
Post subject: Re: Newbie: how to do this rewrite [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Designer" <nospamnono.RemoveThis@hotmail.com> wrote in message
news:WdyAc.21$in5.17@newsfe1-win...
 >
 > so how would you ReWrite a cgi bin for all users on a server?
 >
<font color=purple> > <a style='text-decoration: underline;' href="http://www.domain.com/cgi-bin</font" target="_blank">www.domain.com/cgi-bin</font</a>>
<font color=purple> > <a style='text-decoration: underline;' href="http://www.123.com/cgi-bin</font" target="_blank">www.123.com/cgi-bin</font</a>>
 >
 > resolving to
 >
 > /domain/www/cgi-bin/
 > /123/www/cgi-bin/
 >
 > and have this working as a CGI-BIN
 >
 >
On Apache it is already in place but if you want to modify the above example
something like;
Alias /cgi-bin/ /www/cgi-bin/

Will catchall where all cgi-bins are are kept in the /www/ directory of all users<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Newbie: how to do this rewrite 
Back to top
Login to vote
nospamnono

External


Since: Jun 09, 2004
Posts: 14



(Msg. 10) Posted: Sun Jun 20, 2004 6:13 pm
Post subject: Re: Newbie: how to do this rewrite [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

So the directory \cgi-bin\ everywhere on the server (apache) will act as a
CGI-BIN?

Also how can I test this!



"Bill Logan" <who.TakeThisOut@what.com> wrote in message news:40d3783b@clear.net.nz...
 >
 > "Designer" <nospamnono.TakeThisOut@hotmail.com> wrote in message
 > news:WdyAc.21$in5.17@newsfe1-win...
  > >
  > > so how would you ReWrite a cgi bin for all users on a server?
  > >
<font color=green>  > > <a style='text-decoration: underline;' href="http://www.domain.com/cgi-bin</font" target="_blank">www.domain.com/cgi-bin</font</a>>
<font color=green>  > > <a style='text-decoration: underline;' href="http://www.123.com/cgi-bin</font" target="_blank">www.123.com/cgi-bin</font</a>>
  > >
  > > resolving to
  > >
  > > /domain/www/cgi-bin/
  > > /123/www/cgi-bin/
  > >
  > > and have this working as a CGI-BIN
  > >
  > >
 > On Apache it is already in place but if you want to modify the above
example
 > something like;
 > Alias /cgi-bin/ /www/cgi-bin/
 >
 > Will catchall where all cgi-bins are are kept in the /www/ directory of
all users
 >
 >
 ><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Newbie: how to do this rewrite 
Back to top
Login to vote
spamblocked1

External


Since: Sep 19, 2003
Posts: 3499



(Msg. 11) Posted: Sun Jun 20, 2004 6:23 pm
Post subject: Re: Newbie: how to do this rewrite [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Designer wrote:
 > So the directory \cgi-bin\ everywhere on the server (apache) will act
 > as a CGI-BIN?
 >
 > Also how can I test this!

take one server, mix in a liberal sprinkling of apache, create a cgi-bin and
follow your nose ....

just a suggestion - empirical evidence is always worth far more than
anything you read on usenet.

--
William Tasso<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Newbie: how to do this rewrite 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Rewrite? - I've got a PHP script that registers sessions and send visitor browser data to a MySQL database. I want to run this script when a visitor first comes to my site, regardless of the URL they use to access any page on my site. I thought a rewrite command....

Apache rewrite for moved pages? - Hello all! Does anyone know the syntax for creating a rewrite rule for an .htaccess file used for the following purpose? We have upgraded from MyPHPNuke to PostNuke on our site and any links to our old site will be broken. Here is a couple of examples o...

.htaccess - batch rewrite/ redirect? - I've just taken over a nightmare of a site for an animal rescue organization that has *over* 1500 pages, many of them in a static "yellow pages" directory. I'm really new to manipulating .htaccess files, and I was wondering if there's a way to...

Calling mod_rewrite experts... rewrite based on referring.. - I've got a client we're re-designing a site for - their original site structure was VERY flat... all the pages in the root directory of the site, and the new design calls for directories based on sections of the site, and in a couple of cases, splitting....

Newbie - Are we allowed to post our website URL's here and ask for suggestions?
   Web Hosting and Web Master Forums (Home) -> Webmaster All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]