404 after friendly url set
-
Hi,
I’ve enabled friendly url option and it worked on my server after first refresh. Later on all my resources got 404. The files were there, the .htaccess too and the paths were ok too. I’ve tried to pinpoint where could be the issue and found that after deleting these lines:
RewriteRule .* - [E=ZIP_EXT:.gz] RewriteCond %{HTTP:Cache-Control} !no-cache RewriteCond %{HTTP:If-Modified-Since} !no-cache RewriteCond %{REQUEST_FILENAME}%{ENV:ZIP_EXT} -f RewriteRule (.*) $1%{ENV:ZIP_EXT} [L]
from my .htaccess it started to work without any problems. To be honest, I was removing one line at a time to see which one will make it work. When I thought it was this one, or that one after next refresh (hard reload) it got 404 even tho the files were on server. So the issue must’ve been related with htacess so I removed all rules I didnt know/understand and it started to work ;o)
My current .htacces looks like this:
# BEGIN BWP Minify Rules # BEGIN BWP Minify Headers <Files "*.js.gz"> ForceType application/x-javascript </Files> <Files "*.css.gz"> ForceType text/css </Files> <IfModule mod_mime.c> AddEncoding gzip .gz AddCharset utf-8 .js .css </IfModule> <IfModule mod_deflate.c> <IfModule mod_setenvif.c> SetEnvIfNoCase Request_URI "\.gz$" no-gzip </IfModule> </IfModule> <IfModule mod_headers.c> Header set Cache-Control "public, max-age=86400" Header set Vary "Accept-Encoding" Header unset ETag </IfModule> # END BWP Minify Headers <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTP:Accept-Encoding} gzip RewriteRule ^minify-b(\d+)-([a-zA-Z0-9-_.]+)\.(css|js)$ /index.php?blog=$1&min_group=$2&min_type=$3 [L] </IfModule> # END BWP Minify Rules
and with this it’s working fine (so far). I am not sure what I removed and what impact it will have ;o) Do you have any ideas why this could happen. I remember I had this issue in the past but didn’t had time to debug it and I just returned to the “non-friendly url”.
- The topic ‘404 after friendly url set’ is closed to new replies.