So say I have a website mysite.com/websites
How can I redirect to these urls.
mysite.com/websites?url=http://google.com
to http://google.com
or
mysite.com/websites?url=http://yahoo.com
to http://yahoo.com
You can use that in your .htaccess
:
RewriteEngine on
RewriteCond %{QUERY_STRING} url=(.+) [NC]
RewriteRule ^websites/?$ %1? [NC,R=301,L]
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.