Apache2 .htaccess Rewrites

Lisa Kachold lisakachold at obnosis.com
Fri Aug 13 16:36:43 MST 2010


Hi Chas,


On Fri, Aug 13, 2010 at 4:23 PM, ChasM Marshall <chasm750 at hotmail.com>wrote:

>
>
> ------------------------------
> This certainly IS like herding cats, or ducks or, or...
>
> A thread starts with a subject created by the first author and his/her
> question.
> I was offhand wondering why so MANY replies are NOT made to the original
> post.
> Nor even to the topic's author.  Dialog for it's own sake.  Reminds me of
> FOX news.
> Opinions on opinions of opinions for opinions by opinions . . .
> Well, okay it's not ALL pure junk.
>
> So,
> Usually there are multiple direct replies before a topic's author can
> respond.
> The cruft accumulates, and no one (politely) trims off the bottoms or the
> tops.
> There oughta be a law!
> But instead there will prolly be some newfangled thread enforcement program
> nobody likes.
> Kinda like the M$ crud at the bottom of my free mail.
>
> I can't wait for side-posting.  Aren't some languages right to left?
>
> For example,
> Anyone speak Apache?  Here's an unreplied coding question (07/31):
>
> ---.htaccess
>
> ErrorDocument 404 http://www.somedomain.com/
>
> Options +FollowSymlinks
> RewriteEngine On
> rewriteCond %{http_host} ^somedomain.com
> rewriteRule ^(.*) http://www.somedomain.com/$1 [R=301,L]
>
> Options +FollowSymlinks
> RewriteEngine on
> RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
> RewriteRule ^(.*)$ http://www.somedomain.com/ [R=301,L]
> ---
>
> I'm not sure what he's trying to do here, URL redirection I think.
> This public server, www.somedomain.com has a mirror (twin?) for
> development
> named www.somedomain.dev which is on a seperate private IP.
> The question is, can his .htaccess (in the .dev server) redirect
> his http requests out to the .com public server?
> It would speed up development process without affecting others
> who use the .dev server.  A change of his .htaccess would immediately
> allow a quick comparison of .dev to .com.
>
> Or maybe I got the question wrong.  No one here even tried to answer it.
>
> Ever tried to shepard leopards...?
>

Usually, it's best to edit the subject of the email or it gets lost in the
thread.

>
>   (-:  Chas.M.  :-)
>
> Date: Sat, 31 Jul 2010 21:27:19 -0700
> From: klsmith2020 at yahoo.com
> Subject: .htaccess config help
> To: plug-discuss at lists.plug.phoenix.az.us
>
>
An Apache2 .htaccess file can be used to provide redirection anywhere:

ErrorDocument 404 http://www.somedomain.com/

Options +FollowSymlinks
RewriteEngine On
rewriteCond %{http_host} ^somedomain.com
rewriteRule ^(.*) http://www.somedomain.dev/$1<http://www.somedomain.com/$1>
 [R=301,L]

Options +FollowSymlinks
RewriteEngine on
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteRule ^(.*)$ http://www.somedomain.dev/ <http://www.somedomain.com/>
 [R=301,L]

-- 
Office: (602)239-3392
AT&T: (503)754-4452
http://it-clowns.com <http://it-clowns.com/wiki/index.php?title=Obnosis>
"Faith is, at one and the same time, absolutely necessary and altogether
impossible. "
--Stanislav Lem
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.PLUG.phoenix.az.us/pipermail/plug-discuss/attachments/20100813/37d853e7/attachment.html>


More information about the PLUG-discuss mailing list