Problems with Apache, Rewrite Module and .htaccess

Problems with Apache, Rewrite Module and .htaccess

Post by Andreas Bau » Fri, 17 Sep 1999 04:00:00



Hello,

I have a problem with Apache for WinNT the Rewrite Module and
.htaccess (UNIX users are also welcome to help).

I made a test with a new installed Apache 1.3.9 for WinNT and I made
the following changes in the httpd.conf:

1. I removed the comment char "#" in front of the line
LoadModule rewrite_module modules/ApacheModuleRewrite.dll.

2. I replaced all available "AllowOverride None" with "AllowOverride
All" (<Directory />, <Directory "c:/programme/apache/htdocs">,
<Directory "c:/programme/apache/cgi-bin">).

That was all I changed in the httpd.conf.

After starting Apache and I got the Apache status page for the address
http://www.veryComputer.com/. The Apache worked. Then I have created a RewriteRule
in the httpd.conf

Rewri*gine on
RewriteRule   ^/$  /e/www/  [R]

and for http://www.veryComputer.com/
/e/www/.

After moving the RewriteRule to the .htaccess I got the Apache status
page for the address http://www.veryComputer.com/.

WHAT'S GOING WRONG?

--

cu Andreas Baum

 
 
 

Problems with Apache, Rewrite Module and .htaccess

Post by Joshua Sliv » Fri, 17 Sep 1999 04:00:00



Quote:> Hello,
> I have a problem with Apache for WinNT the Rewrite Module and
> .htaccess (UNIX users are also welcome to help).

I find it a little strange that you consider you question so important
that it must be asked in unrelated newsgropus.  Why don't you start
with the newsgroup most related to your problem?  Followups suitably
narrowed.

Quote:> Rewri*gine on
> RewriteRule   ^/$  /e/www/  [R]
> and for http://www.veryComputer.com/
> /e/www/.
> After moving the RewriteRule to the .htaccess I got the Apache status
> page for the address http://www.veryComputer.com/.

See the following Documentation:
http://www.veryComputer.com/#RewriteBase

What is the problem with having it in the httpd.conf anyway?

--
Joshua Slive

http://www.veryComputer.com/~slive/

 
 
 

Problems with Apache, Rewrite Module and .htaccess

Post by esimo » Sat, 18 Sep 1999 04:00:00


help with server

can apache be run on nt workstation?

or does it have to be run on nt server?

thanks!

esimon


>Hello,

>I have a problem with Apache for WinNT the Rewrite Module and
>.htaccess (UNIX users are also welcome to help).

>I made a test with a new installed Apache 1.3.9 for WinNT and I made
>the following changes in the httpd.conf:

>1. I removed the comment char "#" in front of the line
>LoadModule rewrite_module modules/ApacheModuleRewrite.dll.

>2. I replaced all available "AllowOverride None" with "AllowOverride
>All" (<Directory />, <Directory "c:/programme/apache/htdocs">,
><Directory "c:/programme/apache/cgi-bin">).

>That was all I changed in the httpd.conf.

>After starting Apache and I got the Apache status page for the address
>http://www.veryComputer.com/. The Apache worked. Then I have created a RewriteRule
>in the httpd.conf

>Rewri*gine on
>RewriteRule   ^/$  /e/www/  [R]

>and for http://www.veryComputer.com/
>/e/www/.

>After moving the RewriteRule to the .htaccess I got the Apache status
>page for the address http://www.veryComputer.com/.

>WHAT'S GOING WRONG?

>--

>cu Andreas Baum

 
 
 

Problems with Apache, Rewrite Module and .htaccess

Post by Thor Kotteli » Sat, 18 Sep 1999 04:00:00



> can apache be run on nt workstation?

Yes.

NT questions don't belong in Unix groups. Follow-ups trimmed.

Thor

--
Many Web page users may be operating in contexts very
different from your own. As a content developer, you must
consider these different situations during page design.
<http://www.w3.org/TR/WAI-WEBCONTENT/full-checklist>

 
 
 

1. Problem with Apache's Module "Rewrite"

I have some problems with the Module Rewrite (Apache).

I have two cases:

a) I want to forward all requests to another server, same pathinfo.
   This works well with:

RewriteEngine on
RewriteRule /(.*) http://other.server.com/$1

b) I want to redirect all requests to one file on my server.
   This works well with:

RewriteEnginge on
RewriteRule /.* /warning.html

------------

Now my problem: From time to time I want to switch between a) and b).
I thougth, I could do this by using a RewriteMap (text).

RewriteMap where-to-map txt:/path/map.here

And by changing the content of the file map.here I could switch
between case a) and b) without restarting the server.
(Is this possible?).

But I cannot get it working!

What has the RewriteRule to look like?
What has the text-file to look like?

My last attempt was:  RewriteRule (^/.*$) ${where-to-map:$1|nothing}
and in the textfile:  ^.*$    /warning.html   # for case b)

-> Bad Request
Your browser sent a request that this server could not understand.

:-(

2. Porting Borland C++ console I/O

3. ANNOUNCE: Apache URL Rewriting Module (mod_rewrite) 2.4.0

4. poor Throughput to x86 boxes Sol8

5. apache rewrite module

6. FAQ?

7. Porblem with Apache 1.2b6 rewrite module

8. Looking for programmer

9. Apache: !NEW! URI Rewriting Module

10. ANNOUNCE: Apache URI Rewriting Module V1.7 (mod_rewrite)

11. Rewrite NCSA imagemap calls to Apache module

12. Module rewrite 9/20: x86 module support

13. Module rewrite 7/20: Boot and module PARAM unification