-   Linux - Server (
-   -   rewrite rule for url change (

ravibhure 01-18-2010 03:42 AM

rewrite rule for url change
I want to rewrite one url using apache mod_rewrite,

myurl is

and want to rewrite like this.

can anyone have an idea how I do this.

Please help me.

bathory 01-19-2010 05:41 AM


Try this and see if it works:

RewriteEngine on

RewriteCond %{QUERY_STRING} ^mName=(.*)$
RewriteRule ^app/site/affiliate/viewChannelModule.act$ /app/site/getAdJs.esi/%1 [R]
RewriteRule ^app/site/getAdJs.esi/getAdJs(.*) /app/site/getAdJs.esi?$1 [R,L,NE]

It's a bit difficult, because your URL contains lots of special characters. Hope that it will do.


ravibhure 01-21-2010 10:12 PM

Thanks bathory,
I have tried but not luck, I have tried with some changed into string and it works


RewriteEngine On
RewriteCond %{QUERY_STRING} ^mName=getAdJs(.*)$
RewriteRule ^/app/site/affiliate/viewChannelModule.act /app/site/getAdJs.esi?%1
Here I just wanted to change if fouds the exact query string i.e. 'mName=getAdJs'

Thanks for your help

All times are GMT -5. The time now is 06:06 PM.