This is a discussion on Trouble with rewriterule within the Apache Web Server forums, part of the Web Server and Related Forums category; Hi, I'm using Apache 2.2 on Fedora Core 5 Linux. What I want is if a user requests ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 |
|
|||
|
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 |
| Thread Tools | |
| Display Modes | |
|
|