Welcome Guest, Not a member yet? Register   Sign In
htaccess not working


I have a question about creating a .htaccess file to work with my CodeIgniter setup. One of my url's has a & at the end that I want removed.

What I'm trying to do is to post to facebook. After a user is logged in to facebook they are redirected to my site, but my site works with jquery tabs. So I want a #my-tab3 behind the url to make it open in the right tab. But facebook adds a lot of stuff to the url including the & at the end. Because of that my js can't read the tabs-tag. I thought a rewrite url in htaccess would be an easy fix but for some reason it's just not working. The url I get looks kind of like this: www.mysite.com/ci/index.php/main?state=c32cb8ed2856b8d&code=AQAsHxQ-cdkpm5-k405-‌​kdQS9M94bfiO8e0gQfA7GScPQY#ui-tabs-6&

My code is this:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*)&$ $1 [L,QSA]

The .htaccess file is in my site's root while CodeIgniter is in the map 'ci'.
The code works on url's outside of the CodeIgniter framework.
I have made no changes to any CodeIgniter config files or such.

I feel like I'm missing something rather simple that I just don't know about. I hope somebody is able to help me.

Thank you,

Theme © iAndrew 2016 - Forum software by © MyBB