Results 1 to 4 of 4

Thread: Remove extension

  1. #1
    DiscordHax is offline Junior Member
    Join Date
    Oct 2018
    Posts
    2

    Question Remove extension

    Hello,

    I have tried removing the website extension but it never seems to work.

    example.com/sub.HTML, how would i remove the .html part?

    I have tried making a .htaccess file and put this in but it doesn't change anything

    HTML Code:
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^([^\.]+)$ $1.html [NC,L]
    Any ideas? thanks in advance
    Last edited by DiscordHax; 11-18-2018 at 03:57 PM.

  2. #2
    alemoppo is offline AlterVista Staff
    Join Date
    Feb 2010
    Location
    IT
    Posts
    676

    Default

    You need RewriteBase /, so try:
    Code:
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^([^\.]+)$ $1.html [NC,L]
    Bye!

  3. #3
    DiscordHax is offline Junior Member
    Join Date
    Oct 2018
    Posts
    2

    Default

    Quote Originally Posted by alemoppo View Post
    You need RewriteBase /, so try:
    Code:
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^([^\.]+)$ $1.html [NC,L]
    Bye!
    I have tried what you said, but it still doesn't seem to work. Is there any other way to do this?

  4. #4
    alemoppo is offline AlterVista Staff
    Join Date
    Feb 2010
    Location
    IT
    Posts
    676

    Default

    it seems to work properly: http://discordhax.altervista.org/home

    Bye!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

SEO by vBSEO