Page 1 of 1

Dont understand navigation for the RewriteRule?

Posted: Tue Jun 02, 2009 1:13 am
by Jeyush
I dont proper understand how the RewriteRule will performing.

I have one file called

http://localhost/abc/company.htm?postCo ... btn=Submit

This is the page for I have to write my RewriteRule. So I write the code for that like this.

Code: Select all

Options +MultiViews
Options +FollowSymLinks
 
RewriteEngine On
 
RewriteRule company-postCodeArea-(.*)-btn-(.*)-(.*)\.htm$ abc/company.php?postCodeArea=$1&Search_btn=$2
But I dont get the proper result in the URL part when this page get load.

Can someone please tell me where I go wrong?

My understanding for the mod_rewrite is:

1)create file named .htaccess
2)write the rule.
3)Load the page

What are the must steps need to be done for the RewriteRule?

Re: Dont understand navigation for the RewriteRule?

Posted: Tue Jun 02, 2009 1:53 am
by requinix
First, add an [R] flag to the rule (just like that, with the brackets, after the substitution string).

Now,
1. What URL are you going to?
2. What URL do you end up at?