This is my site. http://matiny.tk/Antihero.html As you can see, the I'm using cPanel. Here are the codes that aren't working.
This next one is only slightly different.
I got this one from someone on Youtube...
Dharman♦ 27.9k21 gold badges75 silver badges127 bronze badges asked May 22, 2014 at 20:57
6 There is one ugly work-around: rename your file to But better is to use edit Try this in your
answered May 22, 2014 at 21:06
nl-xnl-x 11.6k7 gold badges31 silver badges60 bronze badges 6 What you're wanting are what's called pretty URLs.
This way you can share your link as http://matiny.tk/Antihero and you're apache will preserve that url while underneath it's actually serving Antihero.html. See here for some more information: http://code.tutsplus.com/tutorials/using-htaccess-files-for-pretty-urls--net-6049 EDITED: Your last example works fine for me in my htaccess files. [Links to examples have been removed (no longer using .htaccess on the server)]. If it's still not working, could you verify that your htaccess support is enabled in apache?
answered May 22, 2014 at 21:07
View Discussion Improve Article Save Article View Discussion Improve Article Save Article All the pages on the website have a structure which is given by HTML. HTML provides the structure to content, text, tables, headings, and lists on the webpage that makes the page easy to read. While saving an HTML document it has an extension as .html. Therefore, the URL of the website have a .html extension. The .html extension can be easily removed by editing the .htaccess file. .htaccess file: The .htaccess file is created with a Text Editor like Notepad. It is a simple ASCII file that lets the server know what configuration changes are to be made on a per-directory basis.
Removing .html Extension: To remove the .html extension from a URL. For example: example.com/content.html To example.com/content You have to follow these steps:
HTML
You can now link any page inside the HTML document without needing to add the extension of the page as no extension will be visible now in the URL of the website. Example: <a href="http://example.com/image" title="image">image</a> The search engine may index these pages as duplicate content, to overcome this add a <canonical> meta tag in the HTML file. Example: <link rel="canonical" href="https://example.com/blog/first-blog" /> How do I remove .html from URL?html extension can be easily removed by editing the . htaccess file.
How do I remove a PHP from a URL?How to Remove .. Open htaccess file. Open terminal and run the following command to open . htaccess file. ... . Remove . php extension from URL. ... . Restart Apache web server. Restart Apache server with following command $ sudo systemctl restart httpd.. |