Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not works with my htaccess #192

Open
solutac opened this issue Feb 23, 2016 · 4 comments
Open

Not works with my htaccess #192

solutac opened this issue Feb 23, 2016 · 4 comments

Comments

@solutac
Copy link

solutac commented Feb 23, 2016

I have to use htaccess to redirect requests to application root, which is in /public from webserver root. There is bootstrap of application which proccess all requests. So I use this htaccess:

RewriteEngine on
RewriteRule ^\.htaccess$ - [F]
RewriteCond %{REQUEST_URI} =""
RewriteRule ^.*$ /public/index.php [NC,L]
RewriteCond %{REQUEST_URI} !^/public/.*$
RewriteRule ^(.*)$ /public/$1
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^.*$ - [NC,L]
RewriteRule ^public/.*$ /public/index.php [NC,L]

I tried add these lines to htaccess:

RewriteCond %{REQUEST_URI} !/public/ai-cache
RewriteCond %{REQUEST_URI} /public/images
#RewriteRule \.(?:jpe?g)$ /public/adaptive-images.php

or create new htaccess saved in /public folder:

RewriteEngine on
RewriteCond %{REQUEST_URI} !ai-cache
RewriteCond %{REQUEST_URI} images
RewriteRule \.(?:jpe?g)$ adaptive-images.php

but nothing works. Cache folder has enough permissions, but no images are saved there and firebug console alert, that images on the page does not exist.

It is possible to debug in some way? Or can I merge my htaccess and Adaptive images one together?

@staabm
Copy link

staabm commented Feb 23, 2016

Does the your apache in generall accept htaccess settings in this directory?

@solutac
Copy link
Author

solutac commented Feb 23, 2016

Yes it accepts. But I would like to merge it rather. I do not know if images are redirect to adaptive-images.php. How to find out?

@staabm
Copy link

staabm commented Feb 23, 2016

Activate apache access-log and/or rewrite log

@solutac
Copy link
Author

solutac commented Feb 23, 2016

I have activated access log (rewrite log is not possible to manage in customer centre of my webhosting), but there is nothing. Adaptive images is amazing tool, I tested on localhost and it works like charm. But in this case (redirecting of root), which is quite useall, not works. There have to be some way how to merge those two htaccesses.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants