Apache Server configuration support - Trouble with rewriterule

This is Interesting: Free IT Magazines  
Home > Archive > Apache Server configuration support > July 2007 > Trouble with rewriterule





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Trouble with rewriterule
laredotornado@zipmail.com

2007-07-20, 1:21 pm

Hi,

I'm using Apache 2.2 on Fedora Core 5 Linux. What I want is if a user
requests a URL with a particular directory name, "subdir1" to rewrite
the URL replacing "subdir1" with "subdir2". So I created
this .htaccess file

RewriteEngine On
RewriteRule subdir1/(.*) subdir2/$1

and placed it in /webroot/. Unfortunately, when I request

http://mydomain.com/subdir1/test20/...Department=Main

the URL was not rewritten. What is wrong with my .htaccess file?

Thanks, - Dave

Jim Hayter

2007-07-20, 1:21 pm

laredotornado@zipmail.com wrote:
> Hi,
>
> I'm using Apache 2.2 on Fedora Core 5 Linux. What I want is if a user
> requests a URL with a particular directory name, "subdir1" to rewrite
> the URL replacing "subdir1" with "subdir2". So I created
> this .htaccess file
>
> RewriteEngine On
> RewriteRule subdir1/(.*) subdir2/$1
>
> and placed it in /webroot/. Unfortunately, when I request
>
> http://mydomain.com/subdir1/test20/...Department=Main
>
> the URL was not rewritten. What is wrong with my .htaccess file?
>
> Thanks, - Dave
>


I don't use .htaccess so I'm not sure what your problem is. Have you
tried setting RewriteLogLevel to a non-zero value and examining the
rewrite log? It can be very useful in showing you how the rewrite
process works.

Jim
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com