Getting 404 error after adding .htaccess


#1

I recently added a .htaccess file to the root of my site in order to enable gzip compression. Doing so caused all pages except the home page to show a 404 error.

Despite having since removed the .htaccess file the issue remains.

All I would like to do is add the following code to the file to allow gzip compression:

# Compress HTML, CSS, JavaScript, Text, XML and fonts AddOutputFilterByType DEFLATE application/javascript AddOutputFilterByType DEFLATE application/rss+xml AddOutputFilterByType DEFLATE application/vnd.ms-fontobject AddOutputFilterByType DEFLATE application/x-font AddOutputFilterByType DEFLATE application/x-font-opentype AddOutputFilterByType DEFLATE application/x-font-otf AddOutputFilterByType DEFLATE application/x-font-truetype AddOutputFilterByType DEFLATE application/x-font-ttf AddOutputFilterByType DEFLATE application/x-javascript AddOutputFilterByType DEFLATE application/xhtml+xml AddOutputFilterByType DEFLATE application/xml AddOutputFilterByType DEFLATE font/opentype AddOutputFilterByType DEFLATE font/otf AddOutputFilterByType DEFLATE font/ttf AddOutputFilterByType DEFLATE image/svg+xml AddOutputFilterByType DEFLATE image/x-icon AddOutputFilterByType DEFLATE text/css AddOutputFilterByType DEFLATE text/html AddOutputFilterByType DEFLATE text/javascript AddOutputFilterByType DEFLATE text/plain AddOutputFilterByType DEFLATE text/xml

Remove browser bugs (only needed for really old browsers)

BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
Header append Vary User-Agent

My site is still not working. Any suggestions welcome!


#2

uhm… puzzling: if your site is still not working after you have removed the .htaccess file then there is something else broken and it’s not .htaccess fault. What errors do you see in the error log file? Where is your site (maybe the error is evident from the browser: if you share more details maybe someone else here can guess what’s wrong?)


#3

It starting working again about an hour afterwards. No idea why but all seems fine for now.
Thanks


#4

Probably a caching issue.

Remember, if you make a change, be sure to empty your server and browser caches.