Question: I'm trying to redirect one directory on my site to https. The directory is not really a directory at all because the site's dynamic. I'm using ExpressionEngine as the CMS.

I already have a few lines in my .htaccess file to remove the index.php ExpressionEngine adds to all of its urls.

Here's what I have:

```
<IfModule mod_rewrite.c>
        RewriteEngine On

RewriteCond %{SERVER_PORT} 80
RewriteCond %{REQUEST_URI} store 
RewriteRule ^(.*)$ https://mysite.com/store/$1 [R,L]

        # Removes index.php
        RewriteCond $1 !\.(gif|jpe?g|png)$ [NC]
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule ^(.*)$ /index.php?/$1 [L]

</IfModule>

```

When I visit, <http://mysite.com/store/>, it returns <https://mysite.com/store/store/>.

I think it might have to do with the following:

```
    RewriteRule ^(.*)$ /index.php?/$1 [L]

```

The above line has a question mark after the index.php because I was getting a "No input file" error, and that was the recommended fix.

Any thoughts?

Answer: 
Normally Browsers doesnt send the values after the hash sign to the server. You can process them with JavaScript on the Client side. 
See: [Why the hash part of the URL is not in the server side?](https://stackoverflow.com/questions/3664257/why-the-hash-part-of-the-url-is-not-in-the-server-side)
That's unfortunate that they return with a hash character which is meant to be handled in the client side. If you really need to parse the values using your server-side script (PHP), you can redirect again using JavaScript. You can try to add a JavaScript code like:

```
  window.onload = function() {
    // redirect if hash is detected
    if(window.location.hash)
    {
      var redirect_hash = window.location.hash.replace('#', '?');
      var redirect_location = 'http://' + document.domain + redirect_uri;
      window.location = redirect_location;      
    }
  }

```

Then the query string values can be parsed upon redirection.