
June 11th, 2009, 06:02 AM
|
|
Registered User
|
|
Join Date: Jun 2009
Posts: 1
Time spent in forums: 32 m 25 sec
Reputation Power: 0
|
|
|
Rewite is not working
Hi All,
I have apache2 on my ubuntu box.
Quote: root@test:/var/log/apache2# uname -a
Linux test 2.6.24-23-server #1 SMP Thu Nov 27 19:19:15 UTC 2008 i686 GNU/Linux
root@test:/var/log/apache2# |
I want to use 'rewrite' functionality. I want to test simple rewrite rule for testing purpose.
I have enable mod_rewrite on box.
Quote: root@test:/etc/apache2# a2enmod rewrite
This module is already enabled!
root@test:/etc/apache2# |
I have added following lines in /etc/apache2/apache2.conf
Quote: RewriteEngine on
RewriteRule ^/$ /rewrite/ [R]
RedirectMatch ^/$ http : / / www. test. com / rewrite /
RewriteLog "/var/log/apache2/rewrite.log"
RewriteLogLevel 3 |
I don't see any messages in rewrite.lg file. It's not getting redirected also. What's wrong?
The aim is to rewrite http : / / www. test. com / to http : / / www. test. com / rewrite / for testing.
My ultimate aim is to rewrite URL's like below:
from http : / / www. test. com / search ? =mumbai to http : / / mumbai. test. com
Your help is appreciated.
Thanks and Regards,
Shashi
P.S: Please remove space for correct urls.
|