not breaking .htaccess but adding something?

This section is for posting questions which are not directly related to WYSIWYG Web Builder.
Examples of off topics: web server configuration, hosting, programming related questions, third party scripts.

Note that these questions will generally not be answered by the administrators of this forum.
Post Reply
User avatar
jerryco
 
 
Posts: 291
Joined: Fri Mar 27, 2009 2:42 pm
Location: Purmerend, Holland

not breaking .htaccess but adding something?

Post by jerryco » Wed May 20, 2020 9:09 am

Hello friends,

I wondered if anyone can tell me what to add to this file so that it redirects to /index.html on entering the domain name?

Code: Select all

RewriteEngine On

RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\Comodo\DCV)?$
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/.+$
RewriteRule ^(.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] 
// Love is the acceptance of nothing / So, you're here. Now dance.

/ You want RWD? Rotate your damn phone! //

User avatar
crispy68
 
 
Posts: 1104
Joined: Thu Oct 23, 2014 12:43 am
Location: Acworth, GA
Contact:

Re: not breaking .htaccess but adding something?

Post by crispy68 » Wed May 20, 2020 1:01 pm

Where does it go now when entering the domain name? Typically, it automatically searches for the 'index.html' file to load anyway.

User avatar
jerryco
 
 
Posts: 291
Joined: Fri Mar 27, 2009 2:42 pm
Location: Purmerend, Holland

Re: not breaking .htaccess but adding something?

Post by jerryco » Wed May 20, 2020 2:51 pm

Hi, yes, thank you. It does pull up the index.html file, but for my menu to respond (to show the page as a 'pressed button') it would have to really go to https://wwwelkom.nl/index.html.
// Love is the acceptance of nothing / So, you're here. Now dance.

/ You want RWD? Rotate your damn phone! //

User avatar
crispy68
 
 
Posts: 1104
Joined: Thu Oct 23, 2014 12:43 am
Location: Acworth, GA
Contact:

Re: not breaking .htaccess but adding something?

Post by crispy68 » Wed May 20, 2020 3:14 pm

Hmmm... I see what you are describing but I checked several of my own sites and I don't have this problem and I know I've not added anything to the .htaccess file to make it work that way. This tells me it is something else that is keeping it from not working.

In my .htaccess, i do have the http to https rule slightly different than yours. Don't know if it would make a difference or not. I have:

Code: Select all

RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

User avatar
jerryco
 
 
Posts: 291
Joined: Fri Mar 27, 2009 2:42 pm
Location: Purmerend, Holland

Re: not breaking .htaccess but adding something?

Post by jerryco » Wed May 20, 2020 3:32 pm

Hi, I tried your rule instead of the one I had but it makes no difference.
// Love is the acceptance of nothing / So, you're here. Now dance.

/ You want RWD? Rotate your damn phone! //

User avatar
crispy68
 
 
Posts: 1104
Joined: Thu Oct 23, 2014 12:43 am
Location: Acworth, GA
Contact:

Re: not breaking .htaccess but adding something?

Post by crispy68 » Wed May 20, 2020 3:45 pm

Do you get the same results if you use a different menu?

User avatar
jerryco
 
 
Posts: 291
Joined: Fri Mar 27, 2009 2:42 pm
Location: Purmerend, Holland

Re: not breaking .htaccess but adding something?

Post by jerryco » Wed May 20, 2020 4:16 pm

I really wanna use this menu. I think I will simply accept it "as-is".
// Love is the acceptance of nothing / So, you're here. Now dance.

/ You want RWD? Rotate your damn phone! //

User avatar
crispy68
 
 
Posts: 1104
Joined: Thu Oct 23, 2014 12:43 am
Location: Acworth, GA
Contact:

Re: not breaking .htaccess but adding something?

Post by crispy68 » Wed May 20, 2020 4:59 pm

I was just curious if you tried another menu to see if the same thing happens. If it doesn't happen with another menu, then the menu you are using is the culprit. However, if say using the Responsive menu does the same thing, then the problem lies somewhere else.

Post Reply