[FX.php List] [Off] Help with .htaccess RewriteRule or Redirect
Chris Hansen
chris at iViking.org
Fri Mar 21 14:47:34 MDT 2008
Troy,
First off, I love Speakeasy =) That's my ISP too, and they're the
best that I've found.
As for what you want to do, I think that Apache's mod_rewrite would be
just the thing. Basically, mod_rewrite checks all requests and
rewrites the URL before passing back into the server. I'm not sure
about the redirect though... Also, mod_rewrite directives go in your
httpd.conf file. Finally, I'm booked today so I can't really dig into
this until tomorrow (Saturday). At any rate, if you don't get any
better information/offers, drop me a line back channel, and we can
take a look at things tomorrow. Best,
--Chris Hansen
FileMaker 8 Certified Developer
FileMaker 7 Certified Developer
Creator of FX.php
"The best way from FileMaker to the Web."
www.iViking.org
On Mar 21, 2008, at 2:15 PM, Troy Meyers wrote:
> I've been looking at Apache's information about .htaccess and it's
> clear I'm over my head. I suspect someone here is a guru, so I'm
> asking...
>
> The front page an all our images are hosted by a regular hosting
> ISP, Speakeasy. They use Apache and have told me I can use .htaccess
> files in my area of their server.
>
> My domain name is troymeyers.com, and people going to either http://www.troymeyers.com
> or http://troymeyers.com end up on our default front page, which
> shows in their browser location box as http://www.troymeyers.com, I
> suppose but some sort of rewrite that Speakeasy enforces. But that's
> not an issue, it's fine. These front pages come out of the Speakeasy
> server.
>
> We also have Speakeasy doing our DNS stuff, and the name
> "lab.troymeyers.com" is directed to our static IP here (instead of
> Speakeasy's server) at our physical location, and that's where the
> local FileMaker Server, WPE, and FileMaker-connected web server is.
> From the front page at Speakeasy, all deeper pages are hosted in
> this way by us, because all inner links are to some sort of http://lab.troymeyers.com/etc
> .
>
> What I would like to do is be able to use URLs that don't have http://lab
> on the front be automatically redirected (either by Redirect or
> RewriteRule, whatever is most appropriate) if it is aimed at a
> certain directory.
>
> Specifically, if someone uses a URL like this--
> http://troymeyers.com/flasking/anyfilename.etc?etc
> or
> http://www.troymeyers.com/flasking/anyfilename.etc?etc
>
> --their browser would be directed to:
> http://lab.troymeyers.com/flasking/anyfilename.etc?etc
>
> This is ONLY to occur if the directory /flasking/ is in the original
> URL.
>
> The name lab.troymeyers.com refers to the server we have here, and
> Speakeasy's domain server already takes care of getting such queries
> here.
>
> I was wondering if an .htaccess file or other method could be used --
> just for the "directory" /flasking/-- to get the user's machine
> automatically aimed here.
>
> The idea is that if they don't get the prefix "lab." correct for any
> reason, they can still get where they want.
>
> What would the .htaccess file contain, and would I put it in the
> root web directory for www.troymeyers.com, or would I create a /
> flasking/ directory in there and put the .htaccess file there?
>
> I had thought I'd be able to figure this out myself, but in reading
> the instructional docs, I don't even know where to begin. I bet it's
> simple but I don't have a clue. Any help would be appreciated!
>
> -Troy
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
>
More information about the FX.php_List
mailing list