httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From The Disguised Jedi <disguised.j...@gmail.com>
Subject Re: [users@httpd] mod_rewrite questions?
Date Mon, 22 Nov 2004 23:53:09 GMT
You need to download the module and put it in a place where Apache can
get it.  Also, I think that AddModule goes before LoadModule, but I'm
not sure...I gotta say, I'm not too familiar with 1.3.  You should
upgrade to 2.0, it runs better.

I can't really get a link to the module, I'm short on time, but you
can look for it on apache.org, and I think someone else can get you
one.

HTH,

-- 
The Disguised Jedi
disguised.jedi@gmail.com

PHP rocks!


On Sun, 21 Nov 2004 22:47:41 -0600, Bagus <bagus@cox.net> wrote:
> 
> Hi, I'd really like someone's opinion on these issues. Thanks, Bagus
> 
> 
> 
> > -----Original Message-----
> > From: Bagus [mailto:bagus@cox.net]
> > Sent: Thursday, November 18, 2004 9:11 AM
> > To: users@httpd.apache.org
> > Subject: RE: [users@httpd] mod_rewrite questions?
> >
> >
> >
> > Hmm... responding to my own post. I'm getting closer to understanding my
> > plight.
> >
> > I found a certain /usr/ports/distfiles/apache_1.3.4/src/Configuration file
> > that has these lines:
> >
> > # AddModule modules/standard/mod_rewrite.o
> > AddModule modules/extra/mod_jserv.o
> >
> > So that would indicate that this was the file used to do the original
> > configuration and that mod_rewrite is not there yet. Now I'm pretty
> > convinced recompiling is in order.
> >
> > What then would this involve? Apparently uncommenting the mod_rewrite
> > line... anything else
> >
> > Does the LoadModule line go in the configuration file or in the httpd.conf
> > file later?
> >
> > Also, would I be running a Makefile in that src directory or up at the
> > apache_1.3.4 directory?
> >
> > What is that command syntax?
> >
> > How can I be sure that I'm using that configuration file and that
> > the binary
> > gets put into the right place so that when I do my usual
> > /usr/local/apache/sbin/apachectl start that I start the binary
> > with the new
> > mod_rewrite in there?
> >
> > I'd like to be sure as possible that the recompilation doesn't
> > mess with my
> > existing httpd.conf and other jserv and servelet specific
> > properties files.
> > How can I be sure that happens.
> >
> > Is there anything else I should be aware of?
> >
> > Thanks.
> >
> > Bagus
> >
> >
> >
> >
> > > -----Original Message-----
> > > From: Bagus [mailto:bagus@cox.net]
> > > Sent: Thursday, November 18, 2004 8:16 AM
> > > To: users@httpd.apache.org
> > > Subject: RE: [users@httpd] mod_rewrite questions?
> > >
> > >
> > > Thanks Peter,
> > >
> > > It doesn't seem so. I get a 404.
> > >
> > > I'll admit I had some help installing this particular version of
> > > apache. The
> > > box is a older version of FreeBsd. At the time is was one of
> > the first to
> > > support SCSI II. FreeBSD 2.2CAM-19980716-SNAP. Apache has been
> > > compiled with
> > > JServ-1.0b3.
> > >
> > > So again, do y'all think that therefore... mod_rewrite is not
> > > compiled into
> > > my version of apache and therefore I should try to reconfigure
> > my version
> > > and recompile it to get mod_rewrite functionality?
> > >
> > > Thanks.
> > >
> > > Bagus...
> > >
> > > bagus2> lynx http://127.0.0.1/server-info
> > >
> > >                                   Not Found
> > >
> > >    The requested URL /server-info was not found on this server.
> > >      _________________________________________________________________
> > >
> > >
> > >     Apache/1.3.6 Server at www.bagus.org Port 80
> > >
> > >
> > > -----Original Message-----
> > > From: Peter Johnson [mailto:peter@wizardslair.net]
> > > Sent: Sunday, November 14, 2004 4:25 PM
> > > To: users@httpd.apache.org
> > > Subject: Re: [users@httpd] mod_rewrite questions?
> > >
> > >
> > > Bagus,
> > >
> > > Have you got server-info configured? (search through the config for it,
> > > generally is restricted to localhost access only)
> > >
> > > If you do, you should be able to browse to http://127.0.0.1/server-info
> > > (from the machine) and it will show you which modules it has
> > > already loaded.
> > >
> > > How did you install Apache before? What OS is it running on?
> > >
> > > PJ
> > >
> > > Bagus wrote:
> > > Thanks Peter and Tim.
> > >
> > > hmm...
> > >
> > > I'm not sure what's happening now...I've never loaded modules before.
> > >
> > > I'm not sure if I have the mod_rewrite module in my binary. I'm running
> > > 1.3.6 but under Apache-JServ-1.0b3, so I guess it is, but all
> > indications
> > > are that it isn't.
> > > When I tried Peter's suggestion of
> > >
> > > LoadModule rewrite_module
> > > /usr/ports/distfiles/apache_1.3.4/src/modules/standard/mod_rewrite.so
> > > AddModule mod_rewrite.c
> > >
> > > apachectl configtest Gives: Invalid command 'LoadModule', perhaps
> > > mis-spelled or defined by a module not included in the server
> > > configuration
> > >
> > > Hmm.
> > >
> > > Do you think that I'll have to recompile apache to add the
> > > module? Is there
> > > something else wrong? Is there a better way to check if the module is
> > > available? If I do have to recompile, what files do I edit to make this
> > > happen?
> > >
> > > Thanks, oh and btw,
> > >
> > > the goal is only to move someone from the root to the subdirectory. Well
> > > it's kind of to force them into that subdirectory. So if the
> > requested url
> > > was www.neworleansultimate.org/whatever/the/heck.html that should be
> > > rewritten to www.neworleansultimate.org/ultimate/  if the url is
> > > http://www.neworleansultimate.org/ultimate/index.gsp?dA=1681 it
> > should be
> > > left as it is.
> > >
> > > the reason to parse .html files is that then I don't have to name
> > > every file
> > > on my site .shtml. On most sites I create, every file has ssi's in them.
> > > Changing that config line is usually the first thing I ask a
> > > webmaster to do
> > > when I'm starting to build a site on another server. Nobody
> > > really wants to
> > > have to name files .shtml. All the content producers would forget
> > > about it,
> > > so it's just much easier to server parse everything. I've done
> > it on sites
> > > that are 30,000 pages of html and are getting more than 2,000,000
> > > page views
> > > per day without any performance problems. I highly recommend it
> > and got it
> > > from Behlendorf himself many years ago (how about January '95?).
> > >
> > > Bagus
> > >
> > >
> > > -----Original Message-----
> > > From: Tim Burden [mailto:Tim@Burden.ca]
> > > Sent: Thursday, November 11, 2004 9:11 PM
> > > To: users@httpd.apache.org
> > > Subject: Re: [users@httpd] mod_rewrite questions?
> > >
> > >
> > > AddModule and LoadModule don't have a space in them. Neither does
> > > RewriteRule. And you still need RewriteEngine On
> > >
> > > ----- Original Message -----
> > > From: "Bagus" <bagus@cox.net>
> > > To: <users@httpd.apache.org>
> > > Sent: Thursday, November 11, 2004 10:08 PM
> > > Subject: RE: [users@httpd] mod_rewrite questions?
> > >
> > >
> > >
> > > Thanks Peter,
> > >
> > > I'm not sure where the AddModule and LoadModule lines would go. In
> > > httpd.conf? Apache doesn't seem to like them there:
> > >
> > > Also, as for your syntax, there's no space between Rewrite and Rule, is
> > > there? And why the space after the first dollar sign?
> > >
> > > Thanks, what I tried is below. Any help is greatly appreciated.
> > >
> > > Bagus
> > >
> > > httpd.conf:
> > >
> > > Load Module mod_rewrite
> > > Add Module mod_rewrite
> > >
> > > <VirtualHost 204.251.1.186>
> > > ServerAdmin bagus@bagus.org
> > > DocumentRoot /www/htdocs/
> > > ServerName www.neworleansultimate.org
> > > ServerAlias neworleansultimate.org www
> > > DirectoryIndex index.html index.cgi index.gsp index.stm
> > > ErrorLog /usr/local/apache/var/log/www.neworleansultimate-error_log
> > > TransferLog /usr/local/apache/var/log/www.neworleansultimate-access_log
> > > RewriteCond %{HTTP_HOST} ^www.neworleansultimate.org$
> > > RewriteRule ^(.*)$                   /ultimate$1
> > > AddType text/html .shtml
> > > AddType text/html .html
> > > AddType text/html .stm
> > > AddHandler server-parsed .stm .html
> > > ApJServMount /servlets /www
> > > </VirtualHost>
> > >
> > > bagus2> /usr/local/apache/sbin/apachectl configtest
> > > Syntax error on line 231 of /usr/local/apache/conf/httpd.conf:
> > > Invalid command 'Load', perhaps mis-spelled or defined by a module not
> > > included in the server configuration
> > >
> > >
> > >
> > > -----Original Message-----
> > > From: Peter Johnson [mailto:peter@wizardslair.net]
> > > Sent: Thursday, November 11, 2004 5:38 PM
> > > To: users@httpd.apache.org
> > > Subject: Re: [users@httpd] mod_rewrite questions?
> > >
> > >
> > > Hi Bagus,
> > >
> > > Mod Rewrite would do the trick.
> > >
> > > RewriteCond %{HTTP_HOST} ^www.bar.com$
> > > Rewrite Rule ^(.*)$                   /bar$1
> > >
> > > You need to enable the mod_rewrite module. My Apache 1.x is getting a
> > > little rusty but you'll need to make sure that you have both an
> > > AddModule and LoadModule line for the rewrite module.
> > >
> > > Hope that this helps.
> > >
> > > PJ
> > >
> > > Bagus wrote:
> > >
> > >
> > > Hi, hopefully this will be simple.
> > >
> > > I have two virtual hosts pointing at the same directory root.
> > >
> > > They are for example
> > >
> > > http://www.foo.com and http://www.bar.com
> > >
> > > For various resaons I want all requests to http://www.bar.com to be
> > > redirected to http://www.bar.com/bar/
> > >
> > > Is this a Mod Rewrite  issue?  What's the syntax that I'd use?
> > >
> > > Also, when I try putting various configuration bits into the virtual
> > > host directive in my httpd.conf I get errors with apachectl
> > >
> > > configtest.
> > >
> > > ie adding this to a virtual host
> > >
> > > RewriteEngine on
> > > I get:
> > > Syntax error on line 401 of /usr/local/apache/conf/httpd.conf:
> > > Invalid command 'RewriteEngine', perhaps mis-spelled or defined by a
> > > module not included in the server configuration
> > > Is there more that I have to do to get this to work?
> > >
> > > Thanks for any help.
> > >
> > > Bagus
> > >
> > >
> > > ---------------------------------------------------------------------
> > > The official User-To-User support forum of the Apache HTTP Server
> > >
> > > Project.
> > >
> > > See <URL:http://httpd.apache.org/userslist.html> for more info.
> > > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > >    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> > > For additional commands, e-mail: users-help@httpd.apache.org
> > >
> > >
> > > ---------------------------------------------------------------------
> > > The official User-To-User support forum of the Apache HTTP
> > >
> > > Server Project.
> > >
> > > See <URL:http://httpd.apache.org/userslist.html> for more info.
> > > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > >    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> > > For additional commands, e-mail: users-help@httpd.apache.org
> > >
> > >
> > > ---------------------------------------------------------------------
> > > The official User-To-User support forum of the Apache HTTP
> > Server Project.
> > > See <URL:http://httpd.apache.org/userslist.html> for more info.
> > > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > >    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> > > For additional commands, e-mail: users-help@httpd.apache.org
> > >
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > The official User-To-User support forum of the Apache HTTP
> > Server Project.
> > > See <URL:http://httpd.apache.org/userslist.html> for more info.
> > > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > >    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> > > For additional commands, e-mail: users-help@httpd.apache.org
> > >
> > >
> > >
> > --------------------------------------------------------------------- The
> > > official User-To-User support forum of the Apache HTTP Server
> > Project. See
> > > for more info. To unsubscribe, e-mail:
> > > users-unsubscribe@httpd.apache.org "
> > > from the digest: users-digest-unsubscribe@httpd.apache.org For
> > additional
> > > commands, e-mail: users-help@httpd.apache.org
> > >
> > >
> > > ---------------------------------------------------------------------
> > > The official User-To-User support forum of the Apache HTTP
> > Server Project.
> > > See <URL:http://httpd.apache.org/userslist.html> for more info.
> > > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > >    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> > > For additional commands, e-mail: users-help@httpd.apache.org
> > >
> >
> >
> > ---------------------------------------------------------------------
> > The official User-To-User support forum of the Apache HTTP Server Project.
> > See <URL:http://httpd.apache.org/userslist.html> for more info.
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> >    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> >
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message