homepage Welcome to WebmasterWorld Guest from 54.205.106.111
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / WordPress
Forum Library, Charter, Moderators: lorax & rogerd

WordPress Forum

    
Remapping Exisiting Static Urls into Wordpress
Brain Teaser - url rewrite.
Brett_Tabke




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

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




msg:4317978
 3:23 pm on May 26, 2011 (gmt 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?

g1smd




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

,... .

lexipixel




msg:4322138
 4:25 am on Jun 5, 2011 (gmt 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" -->

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / WordPress
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved