Hi all my old site http://l9l.org was a free hosting so I have many sub domain in google http://www.google.jo/search?hl=ar&source=hp&q=site:l9l.org&meta=&aq=f&oq= so when you enter any sub domain http://alshroukschool.l9l.org/ http://a1ama1.l9l.org/vb/ http://www.islama.l9l.org/ it take to a Internet Explorer cannot display the webpage what is the perfect way to add somthing in my htaccess so it automaticly take me to http://l9l.org and it not logic to redirect each subdomain to my home page manual because they are too much
In your .htaccess RewriteEngine On RewriteCond %{HTTP_HOST} !^l9l\.org [NC] RewriteRule (.*) http://l9l.org/$1 [R=301,L] Code (markup): This assumes all the subdomains map to a directory somewhere on your server, if the subdomains don't exist on the new server then you need to set up a wild card entry, your host can do that for you.
Then I'm guessing you don't have the subdomains hosted. Ask your host to set up your account so that anything.yourdomain.com resolves to the home page of your site, after that the .htaccess should work.