Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 3 of 3
  1. #1
    Junior Member
    Join Date
    Nov 2016
    Posts
    3
    Member #
    55673

    HTACCESS all URLs to .html

    Hi all, i have created a website with MUSE which means all URL's end with .html. This is unfortunate as the old website i am replacing had links and URL without the .html extension. I don't want issues with Google and dead links so wondered if anyone knew a solution. Figured htacess code would be the best solution?

  2.  

  3. #2
    Junior Member
    Join Date
    Jan 2017
    Location
    ahemadabad
    Posts
    9
    Member #
    55990
    Liked
    1 times
    Hi,
    you can use With .htaccess under apache you can do the redirect like this:

    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)\.html$ /$1 [L,R=301]
    As for removing of .html from the url, simply link to the page without .html

    <a href="http://www.example.com/page">page</a>
    Thanks
    sonvi.belani

  4. #3
    Junior Member
    Join Date
    Jun 2018
    Location
    Singapore
    Posts
    6
    Member #
    59383
    You can use 301 redirect in .htaccess, so google do not find any dead link.
    Use the below mentioned code for redirection:

    Redirect 301 /en/php/project.html http://www.example.org/newpage.html

    Note: /en/php/project.htmlOld URL
    http://www.example.org/newpage.html New URL


Remove Ads

Posting Permissions

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

Tags for this Thread

All times are GMT -6. The time now is 05:36 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2022 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com