Skip to content
Grav 2.0 is officially stable. Read the announcement →
Installation & Hosting

Rewrites not working

Solved by Nicolas Sirolli View solution

Started by Nicolas Sirolli 7 years ago · 3 replies · 1439 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 antoinep, 2 months ago
8 778 2 months ago
Installation & Hosting · by Jürgen Dietrich, 9 months ago
0 480 9 months ago
Installation & Hosting · by rappluk, 10 months ago
0 532 10 months ago
Installation & Hosting · by N, 1 year ago
3 444 1 year ago
Installation & Hosting · by Youle, 1 year ago
1 371 1 year ago