I want to redirect all index default .asp .aspx .pl .php etc extension to www.example.com.I already have a code that seems to work but dont know if its right or gonna cause issues.


RewriteCond %{THE_REQUEST} ^[A-Z]+\ /([^/]+/)*default(\.[a-z0-9]+)?[^\ ]*\ HTTP/
RewriteRule ^(([^/]+/)*)default(\.[a-z0-9]+)?$ http://www.example.com/$1 [R=301,L]

RewriteCond %{THE_REQUEST} ^[A-Z]+\ /([^/]+/)*index(\.[a-z0-9]+)?[^\ ]*\ HTTP/
RewriteRule ^(([^/]+/)*)index(\.[a-z0-9]+)?$ http://www.example.com/$1 [R=301,L]


Can someone tell me if this code is good?