V
V
Vkok2019-10-16 04:18:44
Database design
Vkok, 2019-10-16 04:18:44

How to remove /index.html from the main page?

How to remove /index.html from the main page of the site using HTACCESS?
Here is https://alpsity.ru/ . It opens like this https://alpsity.ru/ and like this https://alpsity.ru/index.html
And you need something to open only like this https://alpsity.ru/ , and from this the state url https:// alpsity.ru/index.html directed at https://alpsity.ru/

Answer the question

In order to leave comments, you need to log in

2 answer(s)
X
xmoonlight, 2018-07-25
@xmoonlight

Enter:
1. Separate concepts of definitions from groups (separately): "Symptom", "Diagnosis".
2. Determine the dependencies of the concepts among themselves in these groups - form "trees" of symptoms (for different diseases) and "trees" of diagnoses (also for different diseases).
3. Determine the relationship between symptom trees and diagnosis trees.
4. Define "Treatment" lists for each diagnosis tree - this is the order of actions/procedures in treating a particular diagnosis.
5. And now in these lists - indicate the required coefficients for each action / procedure.

B
BATPYIIIKOB, 2019-10-16
@BATPYIIIKOB

Here is an example: for http in htaccess

RewriteEngine On

RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.html\ HTTP/
RewriteRule ^index\.html$ http://example.com/ [R=301,L]

RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteRule ^index\.php$ http://example.com/ [R=301,L]

You can also use PHP:
if( $_SERVER['REQUEST_URI'] == "/index.php" ) {
 header( "Location: /", TRUE, 301 );
 exit();
 }

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question