views:

25

answers:

1

My question is about .htaccess

I am using WordPress 3.0.1 as the front end of my web application. I want most HTTP accesses to follow the normal WordPress flow.

However, I have created a special "Page" in WordPress that has embedded PHP code that powers my web app.

URL's of this form "http://site.com/app/" already go to the correct page.

URL's of this form "http://site.com/app/?a=alpha&b=beta" go to the same page, and pass parameters to my web app. This is correct, but the URL looks ugly.

Here is my question:

I want nice looking URLs of this format:

http://site.com/app/alpha/beta

to be rewritten this way ->

http://site.com/app/?a=alpha&b=beta

I have tried adding various things in .htaccess, but I can't get it to work. I typically end up with a WordPress 404 page being displayed.

Here is the .htaccess file that was created when installing WordPress 3.0.1

# .htaccess
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

I am sure there must be lots of folks using WordPress as a front end for their web app, and others with expertise in .htaccess syntax. Any answers or pointers to solutions would be appreciated.

thanks in advance,

David Jones

[email protected]

http://dxjones.com

A: 

David, don't know the answer for sure, but here's a thought.

You can use plugins like this: http://wordpress.org/extend/plugins/exec-php/

It let's you execute code from within pages or posts.

If you look into the WP documentation, you could easily tie another PHP app into WP.

Sahas Katta
David Jones