httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Henderson <dhender...@digital-pipe.com>
Subject Re: [users@httpd] simple redirect
Date Thu, 10 May 2007 01:44:41 GMT
Joshua Slive <joshua@slive.ca> 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
> http://www.digital-pipe.com/pay should redirect to
> https://secure.digital-pipe.com/paybill.html), 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.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See  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

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):


<VirtualHost xxx.xxx.xxx.xxx:80>
        ServerAdmin support@digital-pipe.com
        ServerName www.digital-pipe.com
        ServerAlias dpiweb

                Redirect permanent /account.html http://login.digital-pipe.com/account.html
                Redirect permanent /terminal.html https://secure.digital-pipe.com/terminal.html
                Redirect permanent /paybill.html https://secure.digital-pipe.com/paybill.html

Redirect /pay https://secure.digital-pipe.com/ssl/paybill.html
#               Redirect permanent /pay.html https://secure.digital-pipe.com/paybill.html


#               RedirectMatch ^/pay$ https://secure.digital-pipe.com/paybill.html

#               RedirectMatch ^/ssl/(.*) https://secure.digital-pipe.com/$1

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

#               Redirect permanent /ssl https://secure.digital-pipe.com/paybill.html
#               Redirect permanent /pay https://secure.digital-pipe.com/terminal.html

        DocumentRoot /var/www/digital-pipe.com/www
        <Directory /var/www/digital-pipe.com/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/
        </Directory>
        ErrorLog /var/log/apache2/digital-pipe.com/www/error.log
        CustomLog /var/log/apache2/digital-pipe.com/www/access.log common
        CustomLog /var/log/apache2/digital-pipe.com/www/referer.log referer
        CustomLog /var/log/apache2/digital-pipe.com/www/agent.log agent

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


also here is the results of the configtest:

# apache2ctl configtest
Syntax OK

Dave

Mime
View raw message