0
Speak Guys, I have a very strange problem, I have the following htaccess:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteBase /
RewriteRule ^galeria/$ galeria.php [NC,L]
RewriteRule ^contato/$ contato.php [NC,L]
</IfModule>
This one above works fine though, if I add one more simple Rewriterule, for example:
RewriteRule ^fotos/$ fotos.php [NC,L]
This new one doesn’t work!
For the searches I did, the people tell to restart apache or make a new . htaccess. I’ve restarted apache, already deleted . htaccess and typed again and does not resolve.
NOTE: Even EXCLUDING . htaccess and repeating apache, the rules for gallery and contact CONTINUE to work.
I am using MacOS native apache, ATOM as editor and I am new with friendly URL. What mistake am I making?
Is it possible the . htaccess file was cached???? Because it seems that happened this, I edit the file, delete, I cause "errors" within it and nothing happens, keeps the rules that I had created last week. I am asking this because it is happening cache with the css file, If I modify the css file today, it does not work unless I go in the browser is type in the url:
localhost/site/css/estilo.css
If the rules keep working when Voce deletes the file, my bet is that you are modifying the wrong file.
– Begnini
So. I suspected this but left the project saved in ATOM (I put an extra note in the question), the changes made in the other files work.
– Donadon
Isn’t the cache? Vc tested on different systems?
– Sidon
@Sidon I cleaned the browsers cache, funny that it is doing this in Safari, Chrome and Firefox. This is the only system that is on Mac for now, I have others on Wamp, on a Windows machine here, and the test I did on Wamp is that excluding . htaccess, the friendly url stops.
– Donadon
Tried in a completely 'clean' browser? try on Vivaldi to see the result.
– Sidon
@Sidon I downloaded Vivaldi and the same thing happened. In the meantime I also installed the MAMP and there works nothing.
– Donadon
Are you using the base tag? .
– Vítor André
Another thing is if you don’t have a folder called photos in your file structure
– Vítor André
@Vítorandré I’m using the base tag yes:
<base href="localhost">
, I don’t have a folder called photos. It’s happening as if I was editing the wrong file because nothing happens. This could be cached as well but in 4 browsers "clean"?– Donadon
@Sidon I think I solved the problem, I used MAMP (Wamp for Macos) and it worked. It must be some OSX native apache2 cache problem... I followed that tutorial to change http.conf ( release user and change documentRoot ). I will do a few more tests to be sure before answering the question and mark as solved.
– Donadon