Web Servers on Unix and Linux - Does mod_rewrite come with Apache 2?

This is Interesting: Free IT Magazines  
Home > Archive > Web Servers on Unix and Linux > October 2006 > Does mod_rewrite come with Apache 2?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Does mod_rewrite come with Apache 2?
laredotornado@zipmail.com

2006-10-26, 1:14 pm

Hi,

For a php project I'm working on, I was instructed to enable the
mod_rewrite module in Apache. I'm running Apache 2 on Fedora Core 4
Linux. Does anyone know where I can download this module? Can't find
it on Google. Is it even available for Apache 2?

Thanks, - Dave

I R A Darth Aggie

2006-10-26, 7:17 pm

On 26 Oct 2006 11:12:28 -0700,
laredotornado@zipmail.com <laredotornado@zipmail.com>, in
<1161886348.597314.67060@e3g2000cwe.googlegroups.com> wrote:

>+ For a php project I'm working on, I was instructed to enable the
>+ mod_rewrite module in Apache. I'm running Apache 2 on Fedora Core 4
>+ Linux. Does anyone know where I can download this module? Can't find
>+ it on Google. Is it even available for Apache 2?


I shocked you can't find it on google. I tried the following search
term on google

mod_rewrite

and the second hit was the Apache v2 docs:

http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html

which describes the module as:

Description: Provides a rule-based rewriting engine to rewrite
requested URLs on the fly
Status: Extension
Module Identifier: rewrite_module
Source File: mod_rewrite.c
Compatibility: Available in Apache 1.3 and later

Sounds like it's part of Apache.

I don't have access to a Fedora install, so I suppose mod_rewrite
could have been bundled out of the main apache2 RPM files. Try "locate
mod_rewrite" to see if/where it is installed on your local filesystem.

--
Consulting Minister for Consultants, DNRC
I can please only one person per day. Today is not your day. Tomorrow
isn't looking good, either.
I am BOFH. Resistance is futile. Your network will be assimilated.
laredotornado@zipmail.com

2006-10-26, 7:17 pm

Thanks. You're right, it does seem to be built into the Apache 2
installation. My question is, how do I enable the module? There is no
mod_rewrite.so file that I can find, only the source file
mod_rewrite.c.

I know the module isn't enabled because if I create an .htaccess file
in

<web root>/temp/.htaccess

RewriteEngine On
Options +FollowSymLinks
Redirect /test.html http://www.open-sef.org

and then visit

http://mydomain.com/temp/test.html

I get a 404 error when really I should be redirected to the URL.

Thanks for any additional help, - Dave




I R A Darth Aggie wrote:
> On 26 Oct 2006 11:12:28 -0700,
> laredotornado@zipmail.com <laredotornado@zipmail.com>, in
> <1161886348.597314.67060@e3g2000cwe.googlegroups.com> wrote:
>
>
> I shocked you can't find it on google. I tried the following search
> term on google
>
> mod_rewrite
>
> and the second hit was the Apache v2 docs:
>
> http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html
>
> which describes the module as:
>
> Description: Provides a rule-based rewriting engine to rewrite
> requested URLs on the fly
> Status: Extension
> Module Identifier: rewrite_module
> Source File: mod_rewrite.c
> Compatibility: Available in Apache 1.3 and later
>
> Sounds like it's part of Apache.
>
> I don't have access to a Fedora install, so I suppose mod_rewrite
> could have been bundled out of the main apache2 RPM files. Try "locate
> mod_rewrite" to see if/where it is installed on your local filesystem.
>
> --
> Consulting Minister for Consultants, DNRC
> I can please only one person per day. Today is not your day. Tomorrow
> isn't looking good, either.
> I am BOFH. Resistance is futile. Your network will be assimilated.


Jim Hayter

2006-10-26, 7:17 pm

laredotornado@zipmail.com wrote:
> Thanks. You're right, it does seem to be built into the Apache 2
> installation. My question is, how do I enable the module? There is no
> mod_rewrite.so file that I can find, only the source file
> mod_rewrite.c.
>
> I know the module isn't enabled because if I create an .htaccess file
> in
>
> <web root>/temp/.htaccess
>
> RewriteEngine On
> Options +FollowSymLinks
> Redirect /test.html http://www.open-sef.org
>
> and then visit
>
> http://mydomain.com/temp/test.html
>
> I get a 404 error when really I should be redirected to the URL.
>
> Thanks for any additional help, - Dave
>
>


If it was built shared, you need something like the following in your
httpd.conf file:
LoadModule rewrite_module modules/mod_rewrite.so

If it was built shared, httpd -M will show it and the httpd.conf created
when you did the install should include the LoadModule directive you need.

Jim
Joshua Slive

2006-10-27, 1:15 pm



On Oct 26, 3:39 pm, laredotorn...@zipmail.com wrote:
> Thanks. You're right, it does seem to be built into the Apache 2
> installation. My question is, how do I enable the module? There is no
> mod_rewrite.so file that I can find, only the source file
> mod_rewrite.c.
>
> I know the module isn't enabled because if I create an .htaccess file
> in
>
> <web root>/temp/.htaccess
>
> RewriteEngine On
> Options +FollowSymLinks
> Redirect /test.htmlhttp://www.open-sef.org
>
> and then visit
>
> http://mydomain.com/temp/test.html
>
> I get a 404 error when really I should be redirected to the URL.
>
> Thanks for any additional help, - Dave


You aren't even using mod_rewrite. The Redirect directive is part of
mod_alias.

And the reason it isn't working is quite possibly because your syntax
isn't right. If you want to redirect /temp/test.html, then you need to
specify
Redirect /temp/test.html http://www...

Joshua.

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com