News:

Wondering if this will always be free?  See why free is better.

Main Menu

Navigation problem

Started by Sir Osis of Liver, April 02, 2021, 12:46:20 PM

Previous topic - Next topic

Sir Osis of Liver

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?
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

live627

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.

Sir Osis of Liver

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.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Aloyoshenka

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/ [nofollow] ? in my website cookie expires after 7 days, you also need to include jQuery.cookie

Advertisement: