Forum Moderators: phranque
But it is giving error, "The requested URL /redirecturl was not found on this server".
I have this piece of code in my httpd.conf
ReWriteRule ^/redirecturl?q=(.*)&url=(.*)$ $2 [R=301,L]
Is there any thing i need to add..or it this wrong?
RewriteCond %{QUERY_STRING} ^q=([^&]*)&url=([^&]+)
RewriteRule ^/redirecturl$ %[b]2?[/b] [R=301,L]
RewriteCond %{QUERY_STRING} ^q=([^&]*)&url=(https?://([a-z0-9][a-z0-9\-]*[a-z0-9]\.)+([a-z]{3,6}¦co\.[a-z]{2})[^&]+) [NC]
RewriteRule ^/redirecturl$ %[b]2?[/b] [R=301,L]
Replace the broken pipe "¦" character in the code above with a solid pipe character before use; Posting on this forum modifies the pipe characters.
To resolve back-references to nested parentheses, count the left parentheses.
Jim
[edit] Corrections (bolded) to remove query string from redirected URL. [/edit]
[edited by: jdMorgan at 2:36 pm (utc) on Oct. 22, 2008]