i want know .htaccess redirect and whats role in seo . and what different b/w other java scrit redirect or .htaccess redirect.
301 redirects can be used in other ways important to SEO when you move pages. For instance, if you have an old folder named files whose contents are being moved or removed, you can avoid an SEO blunder by redirecting anyone who tries to access files in that folder to another file (or folder) as such: RewriteEngine on RewriteRule ^files(.*)$ /some-other-page.html [L,R=301]
You can redirect 404 for your own page. Google dont like to get crawler error means 404 error so you can avoid it using .htaccess redirect