Apache redirect help

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Apache redirect help

Brian Paquin
One of the sites I manage will be moving from dynamic to static
content. I'm having issues creating the proper redirect in
Apache (mod_rewrite) to handle this:

http://www.website.com/dynamic.lasso?id=car
should redirect to
http://www.website.com/pages/car.html

Right now, the redirect gets caught up with the
question mark. Only the "dynamic.lasso" seems
to make it. How do I get the redirect to be based on the
id value instead?  Also, the site will now be on a new
server running Mac OS Tiger server... without Lasso.

Could someone out there help??

Brian

============================================
Attend the Lasso Summit
February 17-19, 2006 in Fort Lauderdale, FL
http://www.LassoSummit.com/
============================================

--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: Apache redirect help

Marc Pope-3
If you were using Lasso, you could modify your error.lasso page in the root
of your site. If you don't use lasso, you'll have to use a mod_rewrite.
However, are these pages really static? How do you plan not to use Lasso?

<?lassoscript

// put in error.lasso page at top

if: response_filepath >> '/pages/';
   
    header;
    'HTTP/1.0 200 OK\r\n';
    'Server: Apache 1.3.2\r\n';
    'MIME-Version: 1.0\r\n';
    'Content-type: text/html\r\n';
    /header;

    var:'page'= response_filepath->(split:'/pages/')->(get:2);
    $page = $page - '.html';

//  make dynamic.lasso support $page var in lieu of (action_param)
    include:'/dynamic.lasso';
    abort;
   
/if;

?>




On 1/22/06 10:36 PM, "Brian Paquin" <[hidden email]> wrote:

> One of the sites I manage will be moving from dynamic to static
> content. I'm having issues creating the proper redirect in
> Apache (mod_rewrite) to handle this:
>
> http://www.website.com/dynamic.lasso?id=car
> should redirect to
> http://www.website.com/pages/car.html
>
> Right now, the redirect gets caught up with the
> question mark. Only the "dynamic.lasso" seems
> to make it. How do I get the redirect to be based on the
> id value instead?  Also, the site will now be on a new
> server running Mac OS Tiger server... without Lasso.
>
> Could someone out there help??
>
> Brian
>
> ============================================
> Attend the Lasso Summit
> February 17-19, 2006 in Fort Lauderdale, FL
> http://www.LassoSummit.com/
> ============================================



============================================
Attend the Lasso Summit
February 17-19, 2006 in Fort Lauderdale, FL
http://www.LassoSummit.com/
============================================

--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: Apache redirect help

Marc Pope-3
In reply to this post by Brian Paquin
Sorry. I think I misread your question, you will probably have to use
ModRewrite to make this work.. I am not sure how that works. I have a script
at work that does something similar. If no one answers, I can look it up in
the morning.

Marc

On 1/22/06 10:36 PM, "Brian Paquin" <[hidden email]> wrote:

> One of the sites I manage will be moving from dynamic to static
> content. I'm having issues creating the proper redirect in
> Apache (mod_rewrite) to handle this:
>
> http://www.website.com/dynamic.lasso?id=car
> should redirect to
> http://www.website.com/pages/car.html
>



============================================
Attend the Lasso Summit
February 17-19, 2006 in Fort Lauderdale, FL
http://www.LassoSummit.com/
============================================

--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: Apache redirect help

stevepiercy
In reply to this post by Brian Paquin
Can we see your current, non-working redirection statement?  My intuition says you did not escape ?, which is a special regular expression character.

Try this:

RewriteRule   /dynamic\.lasso\?id=([a-zA-Z0-9_-]+)    /pages/\1.html

See Apache documentation on mod_rewrite:
<http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html>

--steve


On Sunday, January 22, 2006, [hidden email] (Brian Paquin) pronounced:

>One of the sites I manage will be moving from dynamic to static
>content. I'm having issues creating the proper redirect in
>Apache (mod_rewrite) to handle this:
>
>http://www.website.com/dynamic.lasso?id=car
>should redirect to
>http://www.website.com/pages/car.html
>
>Right now, the redirect gets caught up with the
>question mark. Only the "dynamic.lasso" seems
>to make it. How do I get the redirect to be based on the
>id value instead?  Also, the site will now be on a new
>server running Mac OS Tiger server... without Lasso.
>
>Could someone out there help??
>
>Brian
>
>============================================
>Attend the Lasso Summit
>February 17-19, 2006 in Fort Lauderdale, FL
>http://www.LassoSummit.com/
>============================================
>
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Steve Piercy               Web Site Builder               Soquel, CA
<[hidden email]>                   <http://www.StevePiercy.com>

============================================
Attend the Lasso Summit
February 17-19, 2006 in Fort Lauderdale, FL
http://www.LassoSummit.com/
============================================

--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage