View Single Post

  #2 (permalink)  
Old 07-20-2007
Jim Hayter
 
Posts: n/a
Default Re: Trouble with rewriterule

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/o...epartment=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