Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot remove .html in URL #2

Closed
regexyl opened this issue Mar 22, 2021 · 0 comments
Closed

Cannot remove .html in URL #2

regexyl opened this issue Mar 22, 2021 · 0 comments
Assignees

Comments

@regexyl
Copy link
Owner

regexyl commented Mar 22, 2021

The current format of the .htaccess file requires all link references to remove .html. I.e. '../html/index.html' should be '../html/index'. Is there a way to remove the .html TLD without changing the references?

`RewriteEngine on

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

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

https://stackoverflow.com/questions/5730092/how-to-remove-html-from-url

@regexyl regexyl self-assigned this Mar 22, 2021
@regexyl regexyl closed this as completed May 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant