Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have a folder (assets) on the root of my site that is a symlink to a folder deeper in my file path. I only want a specific set of file types accessible.

On my root, I have this in an .htaccess file:

RewriteEngine on
RewriteCond $1 !^(index\.php|api\.php|assets|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L,QSA]

Options -Indexes

In my assets folder, I have this in an .htaccess file:

allow from all
<Files ~ "\.(js|css|jpg|png|gif|ico|eot|svg|ttf|woff)$">
   order allow,deny
   allow from all
</Files>

The problem I am having is that the query string is being stripped off only when I access the folder.

Example: http://domain.com/controller/method?x=1 correctly stays http://domain.com/index.php/controller/method?x=1

http://domain.com/api.php/controller/method?x=1 correctly stays http://domain.com/api.php/controller/method?x=1

http://domain.com/assets/file.js?x=1 incorrectly becomes http://domain.com/assets/file.js

share|improve this question
    
May be useful to move this question to the webmasters site. –  Hauke Laging May 1 '13 at 21:59
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.