File extensions in url?

At this point, I’m being picky but you can’t access a page by typing Buying and selling domains by experts | Hire a broker today! | Sedo but you have to type Buying and selling domains by experts | Hire a broker today! | Sedo or whatever the file extension is. Is there a way to go to Buying and selling domains by experts | Hire a broker today! | Sedo but without the need of including the .html extension?

You have to do something in htaccess I think

1 Like

well… clearly github found a way with ghpages

I edited my previous post

Here, try this code:

Options +MultiViews

RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.html [NC]
RewriteRule ^ %1 [R,L,NC]

(This is to go in your .htaccess file)

2 Likes

Yea, that’s basically what I did

RewriteEngine On
RewriteCond %{THE_REQUEST} /([^.]+).html [NC]
RewriteRule ^ /%1 [NC,L,R]

RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^ %{REQUEST_URI}.html [NC,L]

Basically always changes any url that includes .html in it to get rid of it and load the same page

So it is working now? If not, use the exact code that @TigerMANEK426 shared.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.