I am looking to create a custom front page for users that are visiting the site. This is a landing page in a way, which will encourage users to register and has different CSS. Once a user is logged in or registered then they can see the normal website. Trying to do this without any modules.
What I have done so far is change the .htaccess file so it loads the index.html first.
DirectoryIndex index.html index.php index.htm
The problem with this method is that users who login in still see the index.html page if they click on any link that points to the Home page. Instead I would like them to see the index.php or the normal Drupal site.
If it possible to do this with preprocess page hook? What code should be used?
I am only trying to present a different front page to the visitor when they hit domain.com. All the other pages such as domain.com/about-us and others should display properly regardless of the user role. In other words, I am NOT trying to hide the whole site for visitors.