I had a .htaccess file doing a very simple rewrite of the page names. This is the contents of the file:
Options +FollowSymlinks RewriteEngine on RewriteRule setup setup.php [NC]
I now want to stop rewriting setup to setup.php - how do I do this? I've tried removing the line from the file, I've tried deleting the file and restarting apache, and it is still rewriting setup to setup.php. How do I make it stop? It seems to be completely ignoring any other .htaccess file I create, and there's nothing being written to the error log. Is it caching the file somewhere? How do I stop it?
I'm using apache2 on ubuntu.
Here is described page caching sites into the browser cache on file storage – mostly on the local hard drive of the computer. Then there is no loading of resources from the WWW server (images, JavaScript, CSS, etc.), but uses the browser cache.
htaccess is that it reads intructions from top to bottom. If an instruction at the top is contradicted by one farther down, the last one to be read will be the one that is used. This allows us to turn off caching without disurbing any existing instructions simply by putting new instructions at the bottom.
What permissions should the file have? 644 permissions are usually fine for an . htaccess file. When you create the file on the server, it should already have these permissions set, so there is most likely nothing to change.
Using . htaccess files slows down your Apache http server. Any directive that you can include in a . htaccess file is better set in a Directory block, as it will have the same effect with better performance."
If you are having problems with the htaccess file not updating due to the redirect getting cached in your browser. You can use a webkit browser like Google Chrome or Safari to open a private browsing session or Incognito Window.
Every time you update the htaccess file, you will need to close all incognito windows/tabs and then open a new one. The incognito window will not write to the cache beyond the current session and will not use the existing cache on initial load. It makes a great way to bypass caching issues when testing, and a great way to see if the issue you are having is caused by your browser's cache.
I am not sure, but Firefox and newer versions of IE might have a similar feature.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With