httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Henderson <>
Subject Re: [users@httpd] simple redirect
Date Thu, 10 May 2007 01:44:41 GMT
Joshua Slive <> wrote: On 5/9/07, Dave Henderson  wrote:

>     Thanks for your replies guys.  Yes I have tried both of the methods that
> Joshua said and neither of them worked.  I don't get any errors when apache
> starts (using 2.0.x) on a Debian Sarge server.  I get an error when I try to
> access the adjusted url (in this case for the 2nd website its
> should redirect to
>, I get a "404
> not found" error in the browser.
>     I initially tried to get this to work on another webpage, and then tried
> it on another thinking that some of the config file for the original site
> might be causing problems.  Here is the relevant config file for the 2nd
> site I tried.

To start, don't put the Redirect/RewriteRule directives inside a
 section. That's just adding complication. (For example,
are you really sure that those requests are hitting that directory?)
If it still doesn't work after you fix that, show us access and error
log info along with the complete  info.


The official User-To-User support forum of the Apache HTTP Server Project.
See  for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

I looked in the logs for any indication as to why it would be failing, but the last write
to the access and error logs were several hours ago.  Not sure why it isn't updating.  Here
is the complete vhost config (post change):

        ServerAlias dpiweb

                Redirect permanent /account.html
                Redirect permanent /terminal.html
                Redirect permanent /paybill.html

Redirect /pay
#               Redirect permanent /pay.html

#               RedirectMatch ^/pay$

#               RedirectMatch ^/ssl/(.*)$1

#               RewriteEngine On
#               RewriteRule ^pay$ /ssl/paybill.html

#               Redirect permanent /ssl
#               Redirect permanent /pay

        DocumentRoot /var/www/
        <Directory /var/www/>
                Options Indexes Includes
                AllowOverride Options
                Order allow,deny
                Allow from all
                # This directive allows us to have apache2's default start page
                # in /apache2-default/, but still have / go to the right place
                #RedirectMatch ^/$ /apache2-default/
        ErrorLog /var/log/apache2/
        CustomLog /var/log/apache2/ common
        CustomLog /var/log/apache2/ referer
        CustomLog /var/log/apache2/ agent

        # Possible values: debug, info, notice, warn, error, crit, alert, emerg.
        LogLevel warn
        ServerSignature On

also here is the results of the configtest:

# apache2ctl configtest
Syntax OK


View raw message