Apache Server configuration support - Looking for config with rewrite-module

This is Interesting: Free IT Magazines  
Home > Archive > Apache Server configuration support > February 2004 > Looking for config with rewrite-module





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 Looking for config with rewrite-module
Martin Schneider

2004-02-17, 1:33 am

Has somebody a httpd.conf-file with a working rewrite-module for
windows?

Martin
Ian.H

2004-02-17, 4:33 am

On Tue, 17 Feb 2004 15:21:07 +0100, Martin Schneider wrote:

> Has somebody a httpd.conf-file with a working rewrite-module for windows?
>
> Martin



Martin,

It should have installed by default AFAIK.. look near the middle (IIRC) of
httpd.conf for the 'AddModule' and 'LoadModule' lines. There should be one
(or more) relating to mod_rewrite. If you uncomment those and restart
apache, that should enable you to use mod_rewrite. I have done on
windoze.. but I don't have that box live right now to look unfortunately.


HTH (a bit?) =)



Regards,

Ian

--
Ian.H
digiServ Network
London, UK
http://digiserv.net/

Justin Koivisto

2004-02-17, 5:33 am

Martin Schneider wrote:

> Has somebody a httpd.conf-file with a working rewrite-module for
> windows?


Apache/1.3.28 - httpd.conf:

about line 180:
LoadModule rewrite_module modules/mod_rewrite.so

about line 225 (after mod_alias):
AddModule mod_rewrite.c

That's all I have in there after install. I think I may have had to
uncomment the lines, and restart, but nothing else.

--
Justin Koivisto - spam@koivi.com
PHP POSTERS: Please use comp.lang.php for php related questions,
alt.php* groups are not recommended.
Official Google SERPs SEO Competition: http://www.koivi.com/serps.php
Martin Schneider

2004-02-17, 8:33 pm

> Martin,
>
> It should have installed by default AFAIK.. look near the middle (IIRC) of
> httpd.conf for the 'AddModule' and 'LoadModule' lines. There should be one
> (or more) relating to mod_rewrite. If you uncomment those and restart
> apache, that should enable you to use mod_rewrite. I have done on
> windoze.. but I don't have that box live right now to look unfortunately.
>
> HTH (a bit?) =)

Tahnx for your reply, the problem is that it doesn't work (see my other
post).
Martin Schneider

2004-02-17, 8:33 pm

> about line 180:
> LoadModule rewrite_module modules/mod_rewrite.so
>
> about line 225 (after mod_alias):
> AddModule mod_rewrite.c


Hi Ian, hi Justin,

thanx for your replys. The problem is that I did it that way, but it
doesn't work.
I took a new http.default.conf and changed the lines attached. I use
this .htaccess-file in the DocumentRoot:

CheckSpelling Off

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) /index.php4

But if I enter a file which does not exist, index.php4 is NOT called.
When calling index.php4 directly, it works of course. Ideas?

Martin



#LoadModule vhost_alias_module modules/mod_vhost_alias.so
#LoadModule mime_magic_module modules/mod_mime_magic.so
#LoadModule status_module modules/mod_status.so
#LoadModule info_module modules/mod_info.so
#LoadModule speling_module modules/mod_speling.so
LoadModule rewrite_module modules/mod_rewrite.so
#LoadModule anon_auth_module modules/mod_auth_anon.so
#LoadModule dbm_auth_module modules/mod_auth_dbm.so
#LoadModule digest_auth_module modules/mod_auth_digest.so
#LoadModule digest_module modules/mod_digest.so
#LoadModule proxy_module modules/mod_proxy.so
#LoadModule cern_meta_module modules/mod_cern_meta.so
#LoadModule expires_module modules/mod_expires.so
#LoadModule headers_module modules/mod_headers.so
#LoadModule usertrack_module modules/mod_usertrack.so
#LoadModule unique_id_module modules/mod_unique_id.so
....


ClearModuleList
#AddModule mod_vhost_alias.c
AddModule mod_env.c
AddModule mod_log_config.c
#AddModule mod_mime_magic.c
AddModule mod_mime.c
AddModule mod_negotiation.c
#AddModule mod_status.c
#AddModule mod_info.c
AddModule mod_include.c
AddModule mod_autoindex.c
AddModule mod_dir.c
AddModule mod_isapi.c
AddModule mod_cgi.c
AddModule mod_asis.c
AddModule mod_imap.c
AddModule mod_actions.c
#AddModule mod_speling.c
AddModule mod_userdir.c
AddModule mod_alias.c
AddModule mod_rewrite.c
AddModule mod_access.c
AddModule mod_auth.c
#AddModule mod_auth_anon.c
#AddModule mod_auth_dbm.c
#AddModule mod_auth_digest.c
#AddModule mod_digest.c
#AddModule mod_proxy.c
#AddModule mod_cern_meta.c
#AddModule mod_expires.c
#AddModule mod_headers.c
#AddModule mod_usertrack.c
#AddModule mod_unique_id.c
AddModule mod_so.c
AddModule mod_setenvif.c
Martin Schneider

2004-02-17, 8:33 pm

Well, when enabling ALL modules, it works...
patpro

2004-02-17, 9:33 pm

In article <40333697.6EDAA7B@yahoo.de>,
Martin Schneider <cangoou@yahoo.de> wrote:

> Hi Ian, hi Justin,
>
> thanx for your replys. The problem is that I did it that way, but it
> doesn't work.
> I took a new http.default.conf and changed the lines attached. I use
> this .htaccess-file in the DocumentRoot:
>
> CheckSpelling Off
>
> RewriteEngine On
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteCond %{REQUEST_FILENAME} !-d
> RewriteRule (.*) /index.php4
>
> But if I enter a file which does not exist, index.php4 is NOT called.
> When calling index.php4 directly, it works of course. Ideas?


well, if your only purpose is to serve index.php4 when a requested file
is not found, it's much simplier to use this kind of thing :

ErrorDocument 404 /index.php4

(and it's probabely faster too)

patpro

--
je cherche un poste d'admin UNIX/Mac
http://patpro.net/cv.php
Justin Koivisto

2004-02-18, 12:33 am

Martin Schneider wrote:
>
>
> Hi Ian, hi Justin,
>
> thanx for your replys. The problem is that I did it that way, but it
> doesn't work.
> I took a new http.default.conf and changed the lines attached. I use
> this .htaccess-file in the DocumentRoot:
>
> CheckSpelling Off
>
> RewriteEngine On
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteCond %{REQUEST_FILENAME} !-d
> RewriteRule (.*) /index.php4
>
> But if I enter a file which does not exist, index.php4 is NOT called.
> When calling index.php4 directly, it works of course. Ideas?


The other thing that I would check is that AllowOverride is set
correctly. For instnace, this is what I have in my httpd.conf:

<Directory "C:/www/htdocs">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>


--
Justin Koivisto - spam@koivi.com
PHP POSTERS: Please use comp.lang.php for php related questions,
alt.php* groups are not recommended.
SEO Competition League: http://seo.koivi.com/
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com