Solved

Mac .htaccess textedit problem

Posted on 2013-06-05
8
469 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
 
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
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Learn by example how to specify CSS selectors for Selenium WebDriver test automation software.
Read about why website design really matters in today's demanding market.
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

910 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now