[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cobalt-users] RewriteRule - Redirecting domain/dir + keep domain > RAQ4 Solution



After reading several posts on using the below code to redirect (keeping
domain name and links in browser) I read up and found the problem.

The below code either in a conf or .htaccess works on the RAQ3 but not on
the RAQ4:
==========
RewriteEngine on
RewriteBase  /
RewriteRule  ^(.*)$ http://newdomain.com/directory/whatever/$1 [P]
==========

The reason it does not work on the RAQ4's is the [P] (proxy) option on the
last line. This uses mod_proxy which was previously an integral part of
apache. This older version is in use on the RAQ3 and is why it works out of
the box.

The RAQ4's use the newer modular version of apache. Cobalt have included the
module on the machines but simply not loaded it.

To load the module simply insert the following line in your httpd.conf (I
have placed it at the bottom of the "Extra Modules" section under php4) :
==========
LoadModule proxy_module modules/libproxy.so
==========

Once done and saved restart httpd using the following command:
==========
/etc/rc.d/init.d/httpd restart
==========

Note: editing httpd.conf and restarting httpd must be done as root. Do not
include the == when cut and pasting, I use them to highlight commands etc.

Hope this helps - I know a few people have been looking for a solution to
this.

Beyond2K - Hostmaster
---------------------------------------------
The World's premier mobile phone boutique
With free SMS & free personal No's
www.b2kcomms.co.uk