Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How long does it take for .htaccess changes to take effect?

Tags:

I have added url rewrite rules to my .htaccess file. Should I see these changes working right away?

like image 460
dev.e.loper Avatar asked Oct 20 '11 13:10

dev.e.loper


People also ask

How long does it take for htaccess to change effect?

htaccess files follow the same syntax as the main configuration files. Since . htaccess files are read on every request, changes made in these files take immediate effect.

How do I know if htaccess rewrite is working?

First, visit https://htaccess.madewithlove.be. Then, enter your site's url and your . htaccess rewrite rule in the appropriate fields. Click Check Now.

Does changing .htaccess require a restart?

No, you will not need to restart Apache. You will need to "hard refresh" your web page to see the changes.

Is htaccess slow?

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."


2 Answers

Changes to .htaccess are immediate and do not require a restart. Normally, if you aren't seeing what you expect from .htaccess changes, you have a syntax error and should check Apache's logs for some idea of what's going on.

like image 52
Dirk Dastardly Avatar answered Sep 17 '22 16:09

Dirk Dastardly


If you use redirect 301, clear browser cache.

like image 40
Matthias Avatar answered Sep 20 '22 16:09

Matthias