Re: htaccess redirect of multi pages to multi destinations

by Complex <complex_hwg(at)yahoo.com>

 Date:  Mon, 12 Aug 2002 12:14:49 -0700 (PDT)
 To:  Rob Atkinson <robatkinson(at)nucleus.com>,
hwg-techniques(at)mail.hwg.org
 In-Reply-To:  nucleus
  todo: View Thread, Original

--- Rob Atkinson <robatkinson(at)nucleus.com> wrote:
> > 
> > Date: Fri, 9 Aug 2002 09:28:57 -0700 (PDT)
> > From: Complex <complex_hwg(at)yahoo.com>
> > Subject: Re: htaccess redirect of multi pages to multi destinations
> > 
> > Aha!
> > 
> > A friend recognized the mistake I was making. I needed to save the
> > .htaccess file with Unix line breaks, not Mac or DOS! So the
> following
> > works, so long as it has Unix line breaks:
> > 
> > RedirectPermanent /first.html http://zarathud.org/page1.html
> > RedirectPermanent /page1.shtml http://zarathud.org/page1.html
> > RedirectPermanent /page2.shtml http://zarathud.org/sub/page2.html
> > RedirectPermanent /page3.html http://zarathud.org/boat/page3.html
> > 
> > I tried following someone's suggestion for /website/first.html,
> etc.
> > but that didn't work, even with Unix line breaks. I think that path
> > just doesn't suit my situation. I also wanted to try rewrite (looks
> > cool!) but I haven't gotten to it yet, and I would have made the
> same
> > mistake anyway.
> > 
> 
> You do not need to save .htaccess files in Unix format.
> 
> You solved your problem by using the 'full URL' for the redirect. 
> Most people, as you say, are not familiar with the Redirect 
> directive and do not realize that you can redirect to any site. 
> That is why you must use the 'full URL'. Simple as that. :-)
> 
> 
> Website Rob
> Helping people create a Potent Web Site

Not so. In response to the corrections you and Brian sent, I made
certain my redirects used the full URL. (I'd actually only made this
mistake in my original post, and not in the actual .htaccess file.) The
multiple redirects still didn't work until I saved it as a Unix file.
Which is to say, until I saved it with the correct kind of line breaks.
That makes sense: why didn't .htaccess files with multiple lines work
until I'd saved them correctly, while a single line .htaccess file
always worked? Because the new lines weren't being recognized as such,
and the whole file probably wound up looking like one string with too
many arguments.

But at any rate, I can tell you that I definitely used full URLs and
was saving the file as a Mac file, and it was NOT working. To make it
work, all I did was save it with the Unix line breaks option.

Hopefully this will be helpful to the next person to come along.

Thanks for your perceptive help!
complex


=====
Note:  Any HTML I've typed probably contains 
spaces or periods to break it in HTML-capable mail readers. 
(e.g.   <.H1>Like This< /H1>  )

__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA