.htaccess file redirect

I have been trying unsuccessfully to redirect my site to an https site of the same name. My ISP had assured me that this .htaccess code would work

“Redirect permanent / https://mydomain.com”.

Of course where it says mydomain.com I put meptec.org.

I used Transmit to upload the simple .htaccess file. ( I saved it as an html file not a rich text file) It would not let me save it with a “dot” in front of the name. I placed it on the server and the file changed to htaccess.html. As htaccess information states, you must remove anything after the name itself, so I removed the .html from the
file name. Now the file just said htaccess without the “dot” in front. They clearly say that the file needs to be “.htaccess”. At this point with Transmit open on the server I added the “dot” in front of the name.
At that point the file went invisible as it should, however the website meptec.org came up with the message "
Internal Server Error" and the website was no longer showing. The ISP told me the Server would reboot sometime during the night and the https would be redirected so I left it all night to see if that would change anything. It did not, so I removed the file this morning
and everything is functioning except I have no redirect.

I even tried waltd’s suggestion from several weeks ago but the redirect did not work. I have several secure sites in the works and I need to be able to make this function properly.

Does anyone out there have a clue as to what is going on?
I am at loss here.

Thanks, Clark


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

First, you have the option in Transmit to show hidden files (which begin with a dot). Have a look in the view menu. Second, make sure that your htaccess file doesn’t have the quotes in it that you showed above. Finally, does your server use a separate root folder for https and http? If not, you are redirecting traffic in a loop. Apache will realize this and throw an error.

Walter


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Redirect 301 https://mydomain.com

Matt

on 05/15/08 8:40 AM Clark Brown said:

I have been trying unsuccessfully to redirect my site to an https site of the same name. My ISP had assured me that this .htaccess code would work

“Redirect permanent / https://mydomain.com”.

Of course where it says mydomain.com I put meptec.org.

I used Transmit to upload the simple .htaccess file. ( I saved it as an html file not a rich text file) It would not let me save it with a “dot” in front of the name. I placed it on the server and the file changed to htaccess.html. As htaccess information states, you must remove anything after the name itself, so I removed the .html from the
file name. Now the file just said htaccess without the “dot” in front. They clearly say that the file needs to be “.htaccess”. At this point with Transmit open on the server I added the “dot” in front of the name.
At that point the file went invisible as it should, however the website meptec.org came up with the message "
Internal Server Error" and the website was no longer showing. The ISP told me the Server would reboot sometime during the night and the https would be redirected so I left it all night to see if that would change anything. It did not, so I removed the file this morning
and everything is functioning except I have no redirect.

I even tried waltd’s suggestion from several weeks ago but the redirect did not work. I have several secure sites in the works and I need to be able to make this function properly.

Does anyone out there have a clue as to what is going on?
I am at loss here.

Thanks, Clark


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Excuse my ignorance guys as I am new to web design only about 1 year. All Freeway of course! Not much code experience at all.

Does it matter whether it is a rich text file or html file?

Walter, I used no quotes in the file.

I placed the file in the same place as my index file. Is this considered the root directory? or should I have placed it elsewhere like the resource folder?

Thanks, Clark


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

It should be a plain text file. I recommend that you get a
dedicated “programmer’s” text editor. There are free and inexpensive
ones all over the interwebs. BareBones’ CodeWrangler is a good choice
– it’s a cut-down version of BBEdit, the grand-daddy of all
programmer’s tools.

Walter

On May 15, 2008, at 10:36 AM, Clark Brown wrote:

Excuse my ignorance guys as I am new to web design only about 1
year. All Freeway of course! Not much code experience at all.

Does it matter whether it is a rich text file or html file?

Walter, I used no quotes in the file.

I placed the file in the same place as my index file. Is this
considered the root directory? or should I have placed it elsewhere
like the resource folder?

Thanks, Clark


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

It’s not going to be an html file unless you format it as such.

.htaccess is just plain ASCII text, done in something like TextWrangler
(free from BareBones.com). You can also create the file right in
Transmit if you don’t want to use TW. I am not sure a server would
understand RICH.

BTW, your earlier thing about the server rebooting overnight: every time
someone asks for a page from you domain, the server looks for the
.htaccess file. If it doesn’t find one in that folder, it moves up a
level until it finds one. If it doesn’t find one anywhere, it knows
there are no special instructions forthcoming. Regardless, changes to
.htaccess are supposed to happen immediately as the file is saved. You
shouldn’t have to wait overnight for it to take effect.

You should set Transmit to display your invisible files (menu View/Show
Invisible Files).

Matt

on 05/15/08 10:36 AM Clark Brown said:

Excuse my ignorance guys as I am new to web design only about 1 year. All Freeway of course! Not much code experience at all.

Does it matter whether it is a rich text file or html file?

Walter, I used no quotes in the file.

I placed the file in the same place as my index file. Is this considered the root directory? or should I have placed it elsewhere like the resource folder?

Thanks, Clark


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

On 15 May 2008, at 15:44, Walter Lee Davis wrote:

BareBones’ CodeWrangler is a good choice

Just so there’s no confusion, that would be TextWranger, no?

best wishes

Paul Bradforth

http://www.paulbradforth.com


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Yes. I don’t use it and was on my iPhone at the time, so I couldn’t
check (easily).

Walter

On May 15, 2008, at 2:55 PM, Paul Bradforth wrote:

On 15 May 2008, at 15:44, Walter Lee Davis wrote:

BareBones’ CodeWrangler is a good choice

Just so there’s no confusion, that would be TextWranger, no?

best wishes

Paul Bradforth

http://www.paulbradforth.com


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

On 15 May 2008, at 20:11, Walter Lee Davis wrote:

Yes. I don’t use it and was on my iPhone at the time, so I couldn’t
check (easily).

Ah, then I forgive you :slight_smile:

best wishes

Paul Bradforth

http://www.paulbradforth.com


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I would suggest just using the good old fashioned TextEdit.app that is already on your mac. You can easily switch the document format to plain text (txt) format.

Since TextEdit even opens Word docs, you can also convert those to txt – thus stripping out Word’s extra layer of evil.

Walter Lee Davis wrote:

It should be a plain text file. I recommend that you get a
dedicated “programmer’s” text editor. There are free and inexpensive
ones all over the interwebs. BareBones’ CodeWrangler is a good choice
– it’s a cut-down version of BBEdit, the grand-daddy of all
programmer’s tools.


Ernie Simpson – Freeway 5 Pro User – http://www.thebigerns.com/freeway/

I find it ever harder (with each upgrade) to get TextEdit to really
give me a plain text document when I want one. Particularly now that
it can display HTML files using WebKit, I cannot use it to edit
anything that it considers a Web page – all it will show me is the
rendered view.

I realize that this doesn’t impact the chore at hand, but I wanted to
point out that it appears as though Apple is removing the plain text
option from some forms of documents.

Walter

On May 16, 2008, at 12:20 PM, Ernie Simpson wrote:

I would suggest just using the good old fashioned TextEdit.app that
is already on your mac. You can easily switch the document format
to plain text (txt) format.

Since TextEdit even opens Word docs, you can also convert those to
txt – thus stripping out Word’s extra layer of evil.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Sometime around 16/5/08 (at 13:30 -0400) Walter Lee Davis said:

I cannot use it to edit
anything that it considers a Web page – all it will show me is the
rendered view.

Try going to TextEdit’s preferences and turn on the ‘Ignore rich text
commands in HTML files’ option in the Open and Save section. I
couldn’t bear it trying to render HTML documents, but this stopped
that completely. If you like, you could also set the New Document
default to Plain Text rather than Rich Text.

I have BBEdit, but sometimes it is just simpler and quicker to use TextEdit.

k


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Well, I am back again with a question on Redirecting a http site to https using an htaccess file. I took your advice and got a copy of BBEdit. I created a text file with the code:

Redirect permanent / https://meptec.org

(This is what GoDaddy gave me to use)

and saved the file as htaccess. Under the options button,
Linebreaks was set to Unix, Encoding was set to Unicode
(UTF-8, no BOM). I tried it this way and Western (Mac OS Roman). I dragged it over to the server using Transmit.
Once the file was on the server I put a dot in front of htaccess. What I received was the message below.

Too many redirects occurred trying to open “https://meptec.org”. This might occur if you open a page that is redirected to open another page which then is redirected to open the original page.

I also tried the Redirect 301 suggested by MFWills in an earlier session. It gave me a different error. I think I am getting closer but being new to this stuff I am not sure.

Again, any ideas?

Thanks for your help in advance!

Clark


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

This particular redirect will only work if you have (on your server)
two completely different folders for your site documents: one for
http and another for https. If you serve both out of the same folder,
then it will not work, because you will simply be redirecting in a
loop, as you have seen. It could work if you have two folders, and
only put the htaccess file in the non-secure folder, not in the
parent folder of both (which would cause it to waterfall down to
apply to both folders).

What might work for you here is a conditional redirect, where you
specifically test to see if the request came in over the secure port
or not.

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://meptec.org%{REQUEST_URI} [R,L]

Again, your mileage may vary, based on how GoDaddy have configured
their servers.

Walter

On May 28, 2008, at 11:16 AM, Clark Brown wrote:

Well, I am back again with a question on Redirecting a http site to
https using an htaccess file. I took your advice and got a copy of
BBEdit. I created a text file with the code:

Redirect permanent / https://meptec.org

(This is what GoDaddy gave me to use)

and saved the file as htaccess. Under the options button,
Linebreaks was set to Unix, Encoding was set to Unicode
(UTF-8, no BOM). I tried it this way and Western (Mac OS Roman). I
dragged it over to the server using Transmit.
Once the file was on the server I put a dot in front of htaccess.
What I received was the message below.

Too many redirects occurred trying to open “https://meptec.org”.
This might occur if you open a page that is redirected to open
another page which then is redirected to open the original page.

I also tried the Redirect 301 suggested by MFWills in an earlier
session. It gave me a different error. I think I am getting closer
but being new to this stuff I am not sure.

Again, any ideas?

Thanks for your help in advance!

Clark


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Walter,
I took the code you provided and pasted it into a text file and placed it as a saved .htaccess file on the server and it worked. The site is not locking up as before on both PC & Mac and it seems to be running fine. The only thing is it comes up with a security info box when you launch the home page or navigate back to it, which isn’t a big deal. It would be nice without but I am just happy it is working.

Thanks for all your help! You’re awesome!!

I have another question. I am self taught in all programs, Adode CS Series, Freeway, etc. What is the best way to teach myself how to write code? What would be your suggestion on programs that could help me with this?

Thanks again, Clark


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

The security code thing might be there if your certificate is in the name of ‘www.yourdomain.com’ and you are redirecting them to ‘yourdomain.org’. Try changing the htaccess to include the www part, and see if that fixes it.

As to learning to code, I would recommend that you try a good book, like the Welling and Thomson PHP/MySQL Web Application Development that I’m always going on about. Start out first with a good text editor (yay, BBEdit!) and just work your way through the first few chapters. Once you get the basics working, then learning to thread the results of that learning back into Freeway is pretty straightforward. But the essential thing is to try to limit the number of variables, hence the recommendation that you make some startlingly ugly text-based experiments first.

Walter


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

A new version of which is scheduled for an August 08 release. Pre-order 'em now.

Todd

On May 28, 2008, at 1:02 PM, waltd wrote:

As to learning to code, I would recommend that you try a good book, like the Welling and Thomson PHP/MySQL Web Application Development that I’m always going on about.