Thanks. I have one more question..
My default website and files in root are in arabic so the detection will be placed in that index.php then if the cluent language is english it will redirect to the /en
Now, after being redirected, if user wants to go to the arabic website he will click the ARABIC link whjch should go to the index.php but guess what will happen...! It will keep redirecting to the /en..
How can i prevent this?