Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: Sir Osis of Liver on April 02, 2021, 12:46:20 PM

Title: Navigation problem
Post by: Sir Osis of Liver on April 02, 2021, 12:46:20 PM
Working on an old website/forum, site is all html.  We want to a display a temporary splash page when visitors first hit domain, then have all Home menu links return to website homepage, not splash page.  First attempt was to change homepage index.html to home.html, add new index.html that displays splash page and links to home.html, then update Home links on all menus.  Each page, including forum, has same header with same menu links, and it goes down several layers.  Header is coded onto every page, so all menus would have to be found and updated, there's no way to do it globally.  There are dozens of pages (possibly over a hundred), would be difficult to find them all, and links would have to be reversed when splash page is eventually removed.  Can brute force it by doing find/replace on all pages, but not really liking that idea.  Is there a better way to do it?
Title: Re: Navigation problem
Post by: live627 on April 02, 2021, 06:14:42 PM
Automated search and replace is your best option in the world of static content. You could use a diff tool to double check your work.
Title: Re: Navigation problem
Post by: Sir Osis of Liver on April 03, 2021, 12:47:18 AM
Hmm, well this works somewhat -

.htaccess



RewriteEngine On
#RewriteCond %{HTTP_HOST} !^https://xhmotorcycles.com/index.html [NC]
RewriteRule ^index.html /home.html [L]



If you go to https://xhmotorcycles.com you see splash page, click on that you're in website, all links to index.html redirect to home.html.  Only problem I see is if you go to https://xhmotorcycles.com/index.html you end up at home.html, not splash page.  RewriteCond doesn't work. :(  Don't know how much of a problem that would be.
Title: Re: Navigation problem
Post by: Aloyoshenka on April 22, 2021, 11:54:40 PM
Quote from: Sir Osis of Liver on April 02, 2021, 12:46:20 PM
We want to a display a temporary splash page when visitors first hit domain

I know I'm late but something like this; https://tenrou-island.com/ ? in my website cookie expires after 7 days, you also need to include jQuery.cookie