Solved

Mac .htaccess textedit problem

Posted on 2013-06-05
8
475 Views
Last Modified: 2013-07-03
Hello,

I'm editing my htaccess file using Microsoft word. Saving file as Mac OS in Microsoft word. I can't get textedit to do it. It keeps trying to tell me that I can no longer save the file in Mac OS.

How do I work with this .htaccess file? I know it's something simple.
0
Comment
Question by:weikelbob
  • 3
  • 3
  • 2
8 Comments
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 39223856
Never Ever edit a web page file like htaccess or javascript or HTML in Microsoft Word.     When you save it, it is no longer plain text which is what is required.  Go back to your Word version and export it as plain text.
0
 
LVL 53

Assisted Solution

by:strung
strung earned 250 total points
ID: 39223887
That's right. Henceforth edit it either using TextEdit (which is on your Mac in the /Applications folder) or download the excellent freeware text editor, TextWrangler:  http://www.barebones.com/products/textwrangler/
0
 
LVL 7

Author Comment

by:weikelbob
ID: 39264549
I'm using textwrangler. It's still giving me an error. Would it be safe to paste my file contents here in a thread? I save it as UTF-8 with Unix line breaks and it still doesn't work
0
Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 250 total points
ID: 39264619
I use TextWrangler on my Mac too.  As long as there are no passwords, you can paste it here.  And if you are saving it as UTF-8, you need to make sure there is no 'BOM' at the beginning.  The commands that go in .htaccess are normally just ASCII though.  File and directory names may not be.  And the default charset for Apache most of the time is either not stated or ISO-8859-1 (Latin 1).
0
 
LVL 53

Expert Comment

by:strung
ID: 39264652
What is the error you are getting?
0
 
LVL 7

Author Comment

by:weikelbob
ID: 39266162
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

Redirect 301 /associated http://bobweikel.com/nlp-articles/what-is-nlp

Redirect 301 /anchor http://bobweikel.com/nlp-articles/what-is-nlp

Redirect 301 /allergy http://bobweikel.com/nlp-articles/what-is-nlp

Redirect 301 /ambiguity http://bobweikel.com/nlp-articles/what-is-nlp

Redirect 301 /beliefs? http://bobweikel.com/nlp-articles/what-is-nlp

Redirect 301 /nlp1 http://bobweikel.com/nlp-articles/what-is-nlp

Redirect 301 /analogue http://bobweikel.com/nlp-articles/what-is-nlp

Redirect 301 /behavior-generator? http://bobweikel.com/nlp-articles/what-is-nlp

Redirect 301 /dsr-training http://bobweikel.com/nlp-articles/what-is-nlp

Redirect 301 /internal-conflict? http://bobweikel.com/nlp-articles/what-is-nlp

Redirect 301 /as-if? http://bobweikel.com/nlp-articles/what-is-nlp

Redirect 301 /caloric-deficit http://bobweikel.com/nlp-articles/what-is-nlp

Redirect 301 /behavioral-changehttp://bobweikel.com/nlp-articles/what-is-nlp

Redirect 301 /whirling-dervishes? http://bobweikel.com/nlp-articles/what-is-nlp

Redirect 301 /anchor-collapse http://bobweikel.com/nlp-articles/what-is-nlp

Redirect 301 /critical-voice? http://bobweikel.com/nlp-articles/what-is-nlp

Redirect 301 /six-step-reframing http://bobweikel.com/nlp-articles/what-is-nlp

Redirect 301 /seminar-boise-idaho http://bobweikel.com/nlp-articles/what-is-nlp

Redirect 301 /anchor-chaining-aspx http://bobweikel.com/nlp-articles/what-is-nlp

Redirect 301 /discovering-the-gift? http://bobweikel.com/nlp-articles/what-is-nlp

Redirect 301 /integrating-conflicting-beliefs? http://bobweikel.com/nlp-articles/what-is-nlp

Redirect 301 /whirling-vortex-process? http://bobweikel.com/nlp-articles/what-is-nlp

Redirect 301 /CU3ER.swf http://bobweikel.com

Redirect 301 /wealthy-mind-idaho-boise? http://bobweikel.com/nlp-articles/what-is-nlp

Redirect 301 /nlp-articles/dsr-coach http://bobweikel.com/nlp-articles/what-is-nlp

Redirect 301 /nlp-articles/dsr-nlp? http://bobweikel.com/nlp-articles/what-is-nlp

Redirect 301 /nlp-articles/dsr-article? http://bobweikel.com/nlp-articles/what-is-nlp

Redirect 301 /most-important-articles-faq http://bobweikel.com/nlp-articles

Redirect 301 /story-around-a-problem? http://bobweikel.com/nlp-articles/what-is-nlp

Redirect 301 /nlp-articles/nlp-master-practitioner? http://bobweikel.com/nlp-articles/what-is-nlp

Redirect 301 /the-spiritual-neuro-logical-level? http://bobweikel.com/nlp-articles/what-is-nlp

Redirect 301 /seminar-boise-idaho/training-calendar http://bobweikel.com/nlp-articles/what-is-nlp

Redirect 301 /nlp-articles/nlp-health-coach-practitioner http://bobweikel.com/nlp-articles/what-is-nlp

Redirect 301 /apply-for-free-weight-loss-case-study? http://bobweikel.com/the-complete-guide-to-weight-loss-tips

Redirect 301 /seven-plus-or-minus-two-and-the-conscious-mind http://bobweikel.com/nlp-articles/what-is-nlp

Redirect 301 /how-do-you-know-i-can-benefit-from-wealth-coaching http://bobweikel.com/nlp-articles/what-is-nlp

Redirect 301 /seminar-boise-idaho/training-talk-calendar http://bobweikel.com/nlp-articles/what-is-nlp

Open in new window

0
 
LVL 7

Author Comment

by:weikelbob
ID: 39298592
Got this. For some reason there were question marks (?) interspersed in the redirect lines.

Thanks guys, sorry it took so long - I don't work on this site very often
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 39298626
Glad you got it working.  Thanks for the points.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Any business that wants to seriously grow needs to keep the needs and desires of an international audience of their websites in mind. Making a website friendly to international users isn’t prohibitively expensive and can provide an incredible return…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question