mercredi 22 mai 2019

How to remove this part of the URL?

I have a problem that I hope you can help me to solve. So, basically, I developed a portfolio website for a client, and it has 4 sections: home, work, feed, info.

So the thing is that I developed everything but the home page using Wordpress (Semplice template, which is kind of a live editor).The home page was created using html, css and js on my own.

I uploaded everything to my host, and I want the website to load firstly the Home page I designed with my code. From this home page you can go using the nav to the other sections created with Wordpress.

So one of the main things that I already solved was the fact that I had in the same folder an index.php (the wordpress default index, needed to load all of the other wordpress sections, so I cant delete it) and the index.html (the one I've coded myself). As I couldn't just delete the index.php as it was necessary to load the other wordpress sections, I had to use the .htaccess file to redirect it, so when I type https://mysitedomain.com it goes to https://mysitedomain.com/index.html

I managed to do it pasting this code in the top of the .htaccess file:

RewriteRule ^$ https://mysitedomain.com/index.html [L,R=301]

What I want to do now is hiding that "/index.html" from the main link when I go to the website. If I take it away from my .htaccess file, the website will charge the wordpress index.php, which is what I am trying to avoid.

How can I hide that "/index.html" from the main link but not affecting the redirection that I previously did to charge my index.html file instead of the wordpress index.php?




Aucun commentaire:

Enregistrer un commentaire