hd.
hd.

Reputation: 18306

issue in redirect urls in htaccess

I want to redirect a url to another location using htaccess file. Here's what I write but it doesn't work:

RewriteRule ^index.php?module=paper&func=view_abtract&code=([0-9]+) http://$1.papers.abstract.com [L,R=301]

I try to find the problem ... but nothing found

Edited.

Upvotes: 0

Views: 55

Answers (1)

anubhava
anubhava

Reputation: 785128

You cannot use Query string in RewriteRule. Use this code instead:

Options +FollowSymLinks -MultiViews
RewriteEngine on

RewriteCond %{QUERY_STRING} ^module=paper&func=view_astract&code=([^&]+) [NC]
RewriteRule ^index\.php/?$ http://%1.papers.abstract.com? [L,R=301,NC]

Upvotes: 1

Related Questions