I am currently getting 404 errors on Google crawler.
Situation:
There are user profiles under this domain structure:
http://www.domain.com/user/username
but: http://www.domain.com/user is not a real page so it throws a 404 error.
http://www.domain.com/users exists.
So, is there a way to redirect people who type in http://www.domain.com/user to http://www.domain.com/users without affecting http://www.domain.com/user/username ?
Thanks
Yes, a
RewriteRulewith an expression that anchors the end of the URL atuserwith$can be rewritten accordingly. The/?allows for an optional trailing/.The above will redirect the browser so the URL
/usersshows in the address bar. If you only want a silent internal rewrite, change[L,R=301]to[L].If you don’t want to invoke mod_rewrite, you can probably use a
RedirectMatchinstead.