• OzzModz is no longer taking registrations. All registrations are being redirected to Snog's Site
    All addons and support is available there now.

Speed Up Your Site Via htaccess

This works great, and I love the included security bonuses! Thanks so much!!

One quick suggestion. In the final code, this line seems to have a break in the middle of it:

Code:
# Measures to block out  SQL injection attacks
RewriteCond %{QUERY_STRING} ^.*(;|<|>|'|"|\)|%0A|%0D|%22|%27|%3C|%3E|%00).*(/\*|union|select|insert|cast|set|declare|drop|

update|md5|benchmark).* [NC,OR]

Caused a 500 server error at first. Simply getting rid of the line break got it working fine:

Code:
# Measures to block out  SQL injection attacks
RewriteCond %{QUERY_STRING} ^.*(;|<|>|'|"|\)|%0A|%0D|%22|%27|%3C|%3E|%00).*(/\*|union|select|insert|cast|set|declare|drop|update|md5|benchmark).* [NC,OR]
 
Yeah I think something went wonky in the editor when I added it. I adjusted it in the first post. :)
 
Kind lost with all the different codes

Which is the best one to put into the htacces for shared hosting if running vB 4 and DBSEO?
 
The final code is the one to use, I just broke it down bit by bit to show what each thing does. :)
 
Thanks
Just gave it a try and without using all the checks and just going on my own feel of speedness of the site it has made it faster for sure.
Thanks ozzy...
 
Before I begin adding this code, I just wanted to make sure something. Should this code be added at the top of the htaccess before everything, or at the bottom after everything?
 
When I have a question (doubt) such as that, I save my current .htaccess file to my computer. Then I do the edits on yet another copy, and upload it as "htaccess.txt."

Then I swap the names in the server, renaming ".htaccess" to, "htaccess_old.txt" then rename the new one, ".htaccess."

This allows you to try it before you buy it, and easy to revert just by re-naming the files back to what they were. But if all is Joy, not necessary.
 
Sound advice. I just added it to the end of the htaccess to be sure and it looks like that was the correct choice. What a great code. I'm noticing a lot faster load times for my site now.
 
Sound advice. I just added it to the end of the htaccess to be sure and it looks like that was the correct choice. What a great code. I'm noticing a lot faster load times for my site now.
Glad to hear it helped ya.
 
Hi ozzy i got your reply where you told me to do this below:

Yep, needs some seious speed improvments, I suggest reading the following.

Speed Up Your Site Within The ACP

Speed Up Your Site Via htaccess

Other than that it look fine so far.

1, Speed Up Your Site Within The ACP - I have done all those suggestions.
2, Speed Up Your Site Via htaccess - i don't see my htaccess in my cPanel and i have clicked show hidden files, i was wondering is there any chance you could do mine for me, i can PM you all login details.

Please let me know.

Thank you in advance.

Paul aka SpiDeR
 
SᴩiDᴇЯ;23867 said:
yes using centos
Ok well, you just create a .txt document and load the code on that. Name it "htaccess.txt." Upload this to the root of your server, then re-name it ".htaccess"

The dot at the beginning is vital.
 
Back
Top