Welcome to WebmasterWorld Guest from 50.17.74.162

Forum Moderators: rogerd & travelin cat

Message Too Old, No Replies

Remapping Exisiting Static Urls into Wordpress

Brain Teaser - url rewrite.

     

Brett_Tabke

9:02 pm on May 25, 2011 (gmt 0)

WebmasterWorld Administrator brett_tabke is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



I have some existing perl urls that are created static via mod rewrite. For example:

www.foo.com/HappyStaticURL.htm

Is translated itno

/docroot/program.cgi?id=HappyStaticURL

Which generates the page. We end up with classic static urls hidding dynamic content.

Moving to Wordpress.

I have the same perl code (program.cgi) above that I can call from a Wordpress post. This works great. However, I have been unable to map the static url into a dynamic wordpress php call that I can then call back to the perl from the post.

How would I go about that?


It seems like I should be able to use mod_rewrite to:

RewriteRule ^(.*).htm /index.php?record=$1&action=p1&src=cmdline&p=466

Where p=466 is the post that contains the perl call.

At this point, Word press does call and display that post. However, It is issuing a redirect to the permalink, and it is not passing any params. So the perl doesn't know which record to produce.

lorax

3:23 pm on May 26, 2011 (gmt 0)

WebmasterWorld Senior Member lorax is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



So the situation is that you have a post with a link to one of these translated URIs and you want to pull the output of the processed page into the WordPress framework rather then have it display on it's own. Correct?

First, are we talking actual Posts or Pages?

If Posts, do these particular files belong to a category all their own?

If Pages, do you know how to use custom templates?

g1smd

6:29 pm on May 26, 2011 (gmt 0)

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



,... .

lexipixel

4:25 am on Jun 5, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Possibly related --- I don't think you can pass parameters to a perl script when called using SSI.

e.g-

This works:

<!--#exec cgi="/cgi-bin/program.cgi" -->

But this won't pass the '?q=1234' query

<!--#exec cgi="/cgi-bin/program.cgi?q=1234" -->