Hi,
my url path is http://localhost/codeigniter/home when I click any link using ajax, then that url path as http://localhost/codeigniter/home#2users.....
But I need only http://localhost/codeigniter/home ....
How to write to hide the #2users from the last sements in url using codeigniter...
I am using htaccess to hide index.php... pls suggest to hide the #2users from url using htaccess file.........
rewrite the url using htaccess
Moderator: General Moderators
-
vijayalakshmi
- Forum Newbie
- Posts: 8
- Joined: Tue Jan 21, 2014 10:22 pm
Re: rewrite the url using htaccess
You cannot hide the # using a .htaccess. The server never receives that piece of information at all.
But you shouldn't even hide it: changing the URL like that is what lets people bookmark or share the page. Otherwise all they could do is link to the homepage. If you don't care about your users then it still might not even be possible to hide - check with your CI settings or whatever to see if there's a way, and if not then you'll have to either live with it or use a different AJAX mechanism.
But you shouldn't even hide it: changing the URL like that is what lets people bookmark or share the page. Otherwise all they could do is link to the homepage. If you don't care about your users then it still might not even be possible to hide - check with your CI settings or whatever to see if there's a way, and if not then you'll have to either live with it or use a different AJAX mechanism.