Support Team
posted this
10 May 2023
Hello,
You can remove the .html extensions from the website links on websites hosted in Nicepage hosting.
To remove the .html extension from your website links on your hosting, you must configure your web server to use URL rewriting. This is a process where URLs that end with .html are rewritten to appear without the extension.
The specific steps to achieve this will depend on your web server. If you are using Apache, you can accomplish this by creating an .htaccess file in your website's root directory and adding the following code:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.html -f
RewriteRule ^(.*)$ $1.html
This code will check if the requested URL corresponds to a directory or if the requested URL with the .html extension exists as a file. If both conditions are true, it will rewrite the URL to remove the .html extension.
After adding this code to your .htaccess file, you can access your website pages without the .html extension in the URL.
If you are hosting your website on web hosting services, contact them for assistance so they can help you.
...................................................
Sincerely,
Ahmad.
Nicepage Support Team
Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1
Follow us on Facebook: http://facebook.com/nicepageapp
Hello,
You can remove the .html extensions from the website links on websites hosted in Nicepage hosting.
To remove the .html extension from your website links on your hosting, you must configure your web server to use URL rewriting. This is a process where URLs that end with .html are rewritten to appear without the extension.
The specific steps to achieve this will depend on your web server. If you are using Apache, you can accomplish this by creating an .htaccess file in your website's root directory and adding the following code:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.html -f
RewriteRule ^(.*)$ $1.html
This code will check if the requested URL corresponds to a directory or if the requested URL with the .html extension exists as a file. If both conditions are true, it will rewrite the URL to remove the .html extension.
After adding this code to your .htaccess file, you can access your website pages without the .html extension in the URL.
If you are hosting your website on web hosting services, contact them for assistance so they can help you.
...................................................
Sincerely,
Ahmad.
Nicepage Support Team
Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1
Follow us on Facebook: http://facebook.com/nicepageapp