Htaccess redirect help

Hi guys,
i have been asked by our management to redirect all the traffic to index.html which as a temporary service interruption notice due to the covid19. i am using below code in htaccess to do the above. infact i got it from google. but one problem is, the index.html has the website logo also (logo.jpg). problem is logo not loading up due to redirect i guess. now i want to adjust below code, so it will allow logo to load. please help.

RewriteRule ^((?!index.html).+)$ /index.html [L]

Hi,

For temporary redirection of a site you must use the following code:

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !^/index\.html$
RewriteRule ^(.*)$ https://yourwebsite.com/index.html [R=307,L]

(replace https : // yourwebsite.com / with your address website)

The logo should work, otherwise you share the html code and we’ll try to figure out where the problem is.

2 Likes

Thanks Dave. ill try this and feedback…