简体   繁体   中英

htacess redirect 410 gone

I've changed my URLs to friendly URLs and had more two parameters so it can rewrite and make a URL structure.

My old URLs look like this one:

  product.php?name=Cal%E7as+de+Sarja+em+Castanho&id=27

And changed to:

 product.php?cat=homem&scat=cal%E7as+de+sarja&name=Cal%E7as+de+Sarja+em+Castanho&id=27

What I want to do is a redirect 410 gone for the old URL (if it´s the best way to solve this problem).

Try :

RewriteEngine on


RewriteCond %{THE_REQUEST} /product\.php\?name=(.+?)&id=(.+) [NC]
RewriteRule ^ - [R=410,L]

This will redirect your old url to HTTP ERROR 410 .

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM