How to get rid of .html

I switched from Sandvox to Freeway Pro. The problem I am having is online links point to a file with out the “.html”
Is there any way that is easy to make it not publish the .html at the end. That way old links will find my site.
I am new to this software and I do not know anything about writing code.
The main problem is. When someone does a search for my category they might find one of my links on line. When the click on it they find a error page. Reason I figure is because of the .html now that appears.
Help


freewaytalk mailing list
email@hidden
Update your subscriptions at:

If you turn on Content Negotiation at your server (you may be able to do this yourself in your Cpanel, or your host can definitely do it if you file a support ticket) then you won’t have to worry about this at all, it will just work. But if you can’t get that to work (it’s the preferred solution) then you can try this Action instead: Clean Links - ActionsForge

Walter

On Oct 17, 2015, at 3:21 PM, Glenn Gray email@hidden wrote:

I switched from Sandvox to Freeway Pro. The problem I am having is online links point to a file with out the “.html”
Is there any way that is easy to make it not publish the .html at the end. That way old links will find my site.
I am new to this software and I do not know anything about writing code.
The main problem is. When someone does a search for my category they might find one of my links on line. When the click on it they find a error page. Reason I figure is because of the .html now that appears.
Help


freewaytalk mailing list
email@hidden
Update your subscriptions at:
Information for existing FreewayTalk / Groups.io users - Site Feedback - Softpress Talk


freewaytalk mailing list
email@hidden
Update your subscriptions at:
https://freewaytalk.softpress.com/person/options

Adding this code to your .htaccess file will (only) hide the html suffix:

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^(.*)$ $1.html

Example

However … adding this code to your .htaccess file will replace the html suffix with an ‘/’ :

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^([^/]+)/$ $1.html 

# Forces a trailing slash to be added
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !(.[a-zA-Z0-9]{1,5}|/)$
RewriteRule (.*)$ /$1/ [R=301,L]

Example


freewaytalk mailing list
email@hidden
Update your subscriptions at:

You may be looking at this from the wrong way.

Presumably you have a current site with a list of links and you will be replacing them with FW generated equivalents.

If that is the case then would a list of 301 redirects from the old links to the corresponding new files make more sense.

Something like

Redirect 301 /old-page /replacement-page.html

David


freewaytalk mailing list
email@hidden
Update your subscriptions at:

Thanks for all the quick responses. I am going to try adding the code into the .htaccess file, or just do a redirect like Delta Dave suggested.
Thanks again


freewaytalk mailing list
email@hidden
Update your subscriptions at: