.htaccess - htaccess / 404 issue for specific files -
i have uploaded new site , therefore had redirect pages. there pages old site fine 404, client can whatever need @ end.
the problem have these not throw 404.
example: on new site have /servers , furthermore: /servers/hp these in htaccess file as: rewriterule ^servers servers.php [nc] , rewriterule ^servers/([^/\.]+)/?$ server.php?s=$1 [l]
however, on old site there file /servers/hp-alphaserver.php - not exist anymore - there no 404, instead shows page /servers
hope makes sense.
found it:
rewritecond %{document_root}servers/([^/\.]+)/$0 !-f rewriterule ^servers/([^/\.]+)/[^/]+$ 404.php [l] this checks see if file exists.
Comments
Post a Comment