Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Rewrites not working

Solved by Nicolas Sirolli View solution

Started by Nicolas Sirolli 7 years ago · 3 replies · 1819 views
7 years ago

Hi,

I'm getting a 404 on subpages. I''m following the trobleshooting guidelines at

https://learn.getgrav.org/16/troubleshooting/page-not-found

Using the htaccess_tester.php file, I get the succesful message claiming that "The file .htaccess exists and is readable to the webserver".

Next I test if rewrites are working by using the simple .htaccess file:

TXT
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule ^.*$ htaccess_tester.php
</IfModule>

and I browse to "http:/mysite.com/test", but I get a "Not Found
The requested URL /mypath/htaccess_tester.php was not found on this server." message.

The trobleshooting guidelines do not explain what to do when this simple .htaccess file fails.

Thanks in advance.

7 years ago

@nsirolli Looks like a similar issue posted some time ago.

It appeared to be an ill configured virtual host.

But as said in my reply to that question, I am a total infrastructure noob, so I might be mistaken…

last edited 01/10/20 by pamtbaau
7 years ago Solution

Hi,

The problem was in the RewriteBase directive in my .htaccess

I was pointing to the path in the server where I have my grav installation; but it had to point to the URL path where my webpage is stored

Thanks anyway for the responses!

👍 1

Suggested topics

Topic Participants Replies Views Activity
Installation & Hosting · by DrPen, 6 days ago
4 117 4 days ago
Installation & Hosting · by vollstock, 3 weeks ago
3 221 3 weeks ago
Installation & Hosting · by David, 7 years ago
3 3508 1 month ago
Installation & Hosting · by David Meissner, 1 month ago
3 345 1 month ago
Installation & Hosting · by David Meissner, 1 month ago
0 269 1 month ago