Trouble with rewriterule
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Apache Server configuration support > Trouble with rewriterule




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Trouble with rewriterule  
laredotornado@zipmail.com


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-20-07 06: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

[url]http://mydomain.com/subdir1/test20/order_form.php?QuickView=0&Department=Main[/url
]

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

Thanks, - Dave






[ Post a follow-up to this message ]



    Re: Trouble with rewriterule  
Jim Hayter


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-20-07 06: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
>
> [url]http://mydomain.com/subdir1/test20/order_form.php?QuickView=0&Department=Main[/u
rl]
>
> 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





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 09:54 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register