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.
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]
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.