php - .htaccess setup to redirect domain's IP to domain.com and remove WWW -


i've been looking , can't seem find proper htaccess both of these.

i don't want people able visit site ip address. 1.1.1.1

instead, redirect 1.1.1. >> mydomain.com

i don't want people able view www.mydomain.com, instead ridirect mydomain.com

how can both of these?

thank you!


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -