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 2 of 2
  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
    11
    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


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:49 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com