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

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Installation & Hosting

Rewrites not working

Solved by Nicolas Sirolli View solution

Started by Nicolas Sirolli 6 years ago · 3 replies · 1285 views
6 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.

6 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
6 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, 1 day ago
7 104 7 hours ago
Installation & Hosting · by Jürgen Dietrich, 7 months ago
0 91 7 months ago
Installation & Hosting · by rappluk, 8 months ago
0 91 8 months ago
Installation & Hosting · by N, 12 months ago
3 76 12 months ago
Installation & Hosting · by Youle, 1 year ago
1 65 1 year ago