FreewayTalk

2 replies to this thread. Most Recent

g dematteis

7 Dec 2019, 7:21 pm

[Pro] 301 redirect

Hi,

My site comes up with “not secure”

I have ssl - but they (network solution) say I need to perform a 301 redirect

Is this possible with Freeway Pr

http://www.hilltop-studios.com

waltd

7 Dec 2019, 9:26 pm

Sure. This is something you would configure on your server, not in Freeway.

If both the secure and the non-secure part of your site is served from the same virtual host, then all you need to do is add an .htaccess file to the same folder on your server as the index.html and that will take care of this for you.

The file needs to be named .htaccess exactly, but you won’t be able to name the file that way on your Mac. So you need to make it named something else, like htaccess.txt, upload it to your server with an SFTP application like Transmit or CyberDuck, and then rename it there.

On Unix and Linux servers, files that are named beginning with a dot are invisible, so you’ll want to find the preference in your SFTP application that allows you to see “invisible” files. You may be surprised at how many of them there are, both on your Mac and on your server. Your server may even have an .htaccess file in the site root already. If that’s the case, then you will need to add this code to the file that’s already there, rather than replacing the existing file with the one you are going to upload.

To make the file, you will need to use a programmer’s text editor like BBEdit (there’s a free version available). You MUST NOT use a word processor like Microsoft Word or Apple Pages.

Into that file, you would add the following directive:

RewriteEngine On 
RewriteCond %{SERVER_PORT} 80
RewriteRule ^ (.*)$ <https://www.hilltop-studios.com/$1> [R,L]

These directions are for the Apache web server, which powers the overwhelming majority of all shared hosting servers. If your host uses a different type of server, then it may not work, although many other server software “emulates” the configuration language of Apache, so you may get away with it.

If your server does not have the mod_redirect module enabled, then the immediate result will be that you see a 500 error on every request to your site. To fix that, you would use your server’s control panel (or file a support ticket) to enable ModRewrite. Most servers have it on by default, but some do not, and it is also possible that a configuration setting keeps you from configuring it via .htaccess, too.

If this doesn’t work at all, comment out the lines that you’ve added to the existing .htaccess (by beginning them with an octothorp #) or if you didn’t already have an .htaccess file, delete the one you uploaded from your server. Then ask your hosting provider to enable mod_rewrite or explain why it can’t be.

Hope this helps,

Walter

On Dec 7, 2019, at 2:21 PM, g dematteis <[email protected]> wrote:

Hi,

My site comes up with “not secure”

I have ssl - but they (network solution) say I need to perform a 301 redirect

Is this possible with Freeway Pr

http://www.hilltop-studios.com

Freeway user since 1997

http://www.walterdavisstudio.com

Back to Top

g dematteis

7 Dec 2019, 9:57 pm

Wow - thank you.

Best,

Gabe De Matteis

On Dec 7, 2019, at 4:26 PM, Walter Lee Davis <[email protected]> wrote:

Sure. This is something you would configure on your server, not in Freeway.

If both the secure and the non-secure part of your site is served from the same virtual host, then all you need to do is add an .htaccess file to the same folder on your server as the index.html and that will take care of this for you.

The file needs to be named .htaccess exactly, but you won’t be able to name the file that way on your Mac. So you need to make it named something else, like htaccess.txt, upload it to your server with an SFTP application like Transmit or CyberDuck, and then rename it there.

On Unix and Linux servers, files that are named beginning with a dot are invisible, so you’ll want to find the preference in your SFTP application that allows you to see “invisible” files. You may be surprised at how many of them there are, both on your Mac and on your server. Your server may even have an .htaccess file in the site root already. If that’s the case, then you will need to add this code to the file that’s already there, rather than replacing the existing file with the one you are going to upload.

To make the file, you will need to use a programmer’s text editor like BBEdit (there’s a free version available). You MUST NOT use a word processor like Microsoft Word or Apple Pages.

Into that file, you would add the following directive:

RewriteEngine On 
RewriteCond %{SERVER_PORT} 80
RewriteRule ^ (.*)$ <https://www.hilltop-studios.com/$1> [R,L]

These directions are for the Apache web server, which powers the overwhelming majority of all shared hosting servers. If your host uses a different type of server, then it may not work, although many other server software “emulates” the configuration language of Apache, so you may get away with it.

If your server does not have the mod_redirect module enabled, then the immediate result will be that you see a 500 error on every request to your site. To fix that, you would use your server’s control panel (or file a support ticket) to enable ModRewrite. Most servers have it on by default, but some do not, and it is also possible that a configuration setting keeps you from configuring it via .htaccess, too.

If this doesn’t work at all, comment out the lines that you’ve added to the existing .htaccess (by beginning them with an octothorp #) or if you didn’t already have an .htaccess file, delete the one you uploaded from your server. Then ask your hosting provider to enable mod_rewrite or explain why it can’t be.

Hope this helps,

Walter

On Dec 7, 2019, at 2:21 PM, g dematteis <[email protected]> wrote:

Hi,

My site comes up with “not secure”

I have ssl - but they (network solution) say I need to perform a 301 redirect

Is this possible with Freeway Pr

http://www.hilltop-studios.com