httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Burden" <...@Burden.ca>
Subject Re: [users@httpd] mod_rewrite questions?
Date Fri, 12 Nov 2004 03:10:51 GMT
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


Mime
View raw message