How would I redirect all pages on my website that have /de/ .php or /en/ .php in the URL? I dont want to redirect domain.com/index.php though, only domain.com/de/.php or /en/*.php.
您可以使用此规则
RewriteRule ^(en|de)/(.*?)\.php$ / [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.