Inconsistency when switching between development to live server?
问题 I always have trouble when moving a site that I've developed in localhost into my hosting server with the .htaccess file. Specifically with relative paths to the files. It's not hard to fix, but it's quite bothering. For example: Whereas ErrorDocument 404 /foo/404.php works in the hosting, for it to work in localhost I have to specify ErrorDocument 404 /projectroot/foo/404.php . When using mod_rewrite, RewriteRule ^example/$ example.php [L,NC] works in localhost, but for it to work in the