G
G
go202015-10-15 19:17:48
Domain name market
go20, 2015-10-15 19:17:48

How to remove .html (etc.) from URL using .htaccess (important: need to work on subdomains)?

It is necessary that:
It was: site.com/page.html It became: site.com/page
It was: sub.site.com/page.html It became: sub.site.com/page
And when accessing, for example, sub.site .com/page.html , the address bar ended up being sub.site.com/page .
I repeat that this whole thing should work with subdomains (the solutions I found could not cope with this, distorting the url in every way with subdomains).

SOLUTION FOUND: you can configure .htaccess for each subdomain separately - so the classic methods (an example of such a link in the comment under question) will work.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Marat, 2015-10-17
@go20

How to remove .html at the end of the address of each web page of the site, without using php?

C
Cosmopus, 2020-02-28
@Cosmopus

I think the best answer is here - watch from 2:44
https://www.youtube.com/watch?v=-6LyG9I-FPc

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question