How to hide index.php from URL for both www and without www on http/https on Amazone |
I am facing the issue of index.php in url, when i visit the site with www then it displaying the index.php in url but without www its url is just fine no index.php in url for both protocol http and https on Amazon cloud server e.g
Case 1: when i put www.example.com/mobiles in url and hit enter, then the url become like the following https://www.example.com/index.php/mobiles Case 2: when i put just example.com/mobiles in url and hit enter, then the url become like https://example.com/mobiles Can we control this through .htaccess if yes then how? Thanks.
You can get rid of the www by adding this to your .htaccess file:
Code: Options +FollowSymlinks See if that will work for you. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(04-04-2016, 03:09 PM)InsiteFX Wrote: You can get rid of the www by adding this to your .htaccess file: I am already extracting www portion from url if some one put www.example.com .htaccess remove it and the url become example.com i am already doing this. Problem Area: My problem here is if one visit to mobiles page and put www with domain name e.g www.example.com/mobiles in this case when the user hit enter the page redirect to mobiles page successfully which is not the issue but if you look at the url the url will be showing like www.example.com/index.php/mobiles, if we put just example.com/mobiles then the url seems ok no index.php part in url, it gives issue only with www. Thank you for your reply.
You could try capturing the url from the user and then doing a string replace on the www part of it.
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |