RewriteEngine On
RewriteCond %{REQUEST_URI} team
RewriteRule ^ http://sitename.co.uk/about? [L,R=301]
The code above works perfectly if the url is /team/
BUT
if the URL is /team/john-smith/ I do not get redirected?
I can't figure out why this wouldn't work! Any ideas??
Thanks in advance
Have this rule with THE_REQUEST
as your top rule:
RewriteEngine On
RewriteCond %{THE_REQUEST} team [NC]
RewriteRule ^team http://sitename.co.uk/about? [L,R=301,NC]
Make sure to use a new browser for testing or completely clear browser cache.
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.