Welcome to WebmasterWorld Guest from 174.129.163.89

Forum Moderators: rogerd & travelin cat

Message Too Old, No Replies

Remapping Exisiting Static Urls into Wordpress

Brain Teaser - url rewrite.

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

Administrator from US 

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

joined:Sept 21, 1999
posts:38069
votes: 15


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.
3:23 pm on May 26, 2011 (gmt 0)

Senior Member from US 

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

joined:Mar 31, 2002
posts:7575
votes: 0


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?
6:29 pm on May 26, 2011 (gmt 0)

Senior Member

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

joined:July 3, 2002
posts:18903
votes: 0


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

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Feb 16, 2004
posts:1341
votes: 0


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" -->
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members