[FX.php List] [Off] Help with .htaccess RewriteRule or Redirect

Troy Meyers tcmeyers at troymeyers.com
Sat Mar 22 05:12:25 MDT 2008


Roger,

Thank you. I've been trying this and variations, both in the www.troymeyers.com and /flasking directories. Still no luck.

Ones I've tried (all prefixed with RewriteEngine On):

RewriteRule ^/flasking/(.*) http://lab.troymeyers.com/flasking/$1 [R]
RewriteRule ^http://www.troymeyers.com/flasking/(.*) http://lab.troymeyers.com/flasking/$1 [R]
RewriteRule ^/flasking/(.*)$ http://lab.troymeyers.com/flasking/$1 [R]
RewriteRule ^http://www,troymeyers.com/flasking/(.*)$ http://lab.troymeyers.com/flasking/$1 [R]

I still get 404 and the same page URL I started with for any of these, in either directory, so rewrite doesn't seem to be occurring.

Thanks for the reference pages. I had been looking at a similar one in the Apache 1.3 docs (that's the server version) but they seemed less helpful than these 2.2 ones you recommended. I still don't know why this isn't working, though.

-Troy


>  On Mar 21, 2008, at 7:52 PM, Troy Meyers wrote:
> 
> > Maybe it's not the right RewriteRule, or maybe SpeakEasy needs to   >
> enable rewrite for me. Or maybe the permissions are wrong. > > Any
> thoughs?
> 
>  From what you've said, SpeakEasy (who happens to be my ISP, with my  
> servers running over one of their 6 MBit DSL lines into my house) have  
> their end in order to allow .htaccess to be used.
> 
> http://httpd.apache.org/docs/2.2/rewrite/rewrite_intro.html
> 
> might get you started with explaining the syntax that's needed.
> 
> If you put the .htaccess into the flasking directory on
> www.troymeyers.com 
> 
>  then that would mean the rewrite would only be working on requests  
> that have made it to that directory.
> 
> So you might do something like this example from the page referenced  
> above
> 
> RewriteRule ^/product/(.*)/view$ /var/web/productdb/$1 The variable $1
> will be replaced with whatever text was matched by the   expression
> inside the parenthesis in the Pattern. For example, a   request for
> http://example.com/product/r14df/view will be mapped to   the path
> /var/web/productdb/r14df
> 
> for example
> 
> RewriteRule ^/flasking/(.*) http://lab.troymeyers.com/flasking/$1
> 
> Roger
> 
> _______________________________________________
> 
> 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