Hi,
I have been testing out with .htaccess on the catalog folder in hope to improve the security access of it but I notice a drop in performance especially when loading stylesheets from the /catalog folder. Can I know if it is common for admins to protect the /catalog folder?
My htaccess as follow
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !^(.+)\.jpg$
RewriteCond %{REQUEST_FILENAME} !^(.+)\.jpeg$
RewriteCond %{REQUEST_FILENAME} !^(.+)\.png$
RewriteCond %{REQUEST_FILENAME} !^(.+)\.gif$
RewriteCond %{REQUEST_FILENAME} !^(.+)\.css$
RewriteCond %{REQUEST_FILENAME} !^(.+)\.js$
RewriteRule ^(.+)$ /404.html [NC]
I’m not entirely sure if I should put my question here but since it relates to css I thought here might be a good place to start.
Any input would be appreciated.
Thanks.
|
|
Hmm, I see what you are trying to achieve, but I don’t think mod rewrite is necessary here. You can try the following:
deny from all
<Files ~ "\.(?i:gif|jpe?g|png|css|js)$">
order deny,allow
allow from all
</Files>
Copy the above code in your .htaccess in the catalog folder, replacing the old one. See if this improves your performance and let us know.
Regards,
ThemeBurn team
|
|
sorry for getting back to you late on this, but it seems that performance is still affected.
without the htaccess it is the quickest followed by your suggestion and the one I have was the slowest of all.
I’ll forward this question to the oc forums since this i doubt this is theme related but I do appreciate your input on this.
|
|
You better ask no the forums I think. I use this .htaccess for a directory with thousands of subdirectories without notable effect on performance. Post here, if you find something interesting.
|
|