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

Home Page redirection Problem

Started by Muut Archive 10 years ago · 2 replies · 373 views
10 years ago

Hi

I have installed Grav in my localhost and everything was fine. When I moved all the files to my hosting provider's root directory, the problem was, when I launched the domain, for instance, example.com, it didn't redirect me to index.php. I had to manually enter example.com/index.php to launch. I am not sure what the problem is. Further, I copy pasted the .htaccess file shipped with grav and uncommented the 'RewriteBase /' entry but it didn't help. This also causes front end problems like partial rendering of pages.

Installed last Grav 1.1.5 and installed land ion template using gpm tool.

10 years ago

Grav should never redirect you to index.php, it should simply use the page routes. This means

  • / home page
  • /something for the internal pages

Without adding /index.php nothing worked?

10 years ago

Normally a hosting provider should have their web server configured properly so index.php and possibly index.htm and index.html are handled when a URL is used which ends with a slash such as example.com/
Apperently Apache is also ignoring the DirectoryIndex setting in the default Grav .htaccess file:

TXT
# Begin - Prevent Browsing and Set Default Resources
Options -Indexes
DirectoryIndex index.php index.html index.htm
# End - Prevent Browsing and Set Default Resources

It seems you need to ask your provider to fix this.

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1338 9 years ago
Archive · by Muut Archive, 9 years ago
2 927 9 years ago
Archive · by Muut Archive, 9 years ago
2 4056 9 years ago
Archive · by Muut Archive, 9 years ago
1 2941 9 years ago
Archive · by Muut Archive, 9 years ago
3 1112 9 years ago