Need help? Check out our Support site, then


How to modify .htaccess for web app (in combination with WordPress)

  1. I am using WordPress 3.0.1 as the front end for my web application.
    I have most of it working, but I need some help customizing ".htaccess"

    Here is what works:

    1. I use Exec-PHP plugin to run my embedded PHP code inside a WordPress "Page" called "app".
    2. I use pretty Permalinks for good SEO. This URL = "http://site.com/app/" displays the correct page and runs my code.
    3. To pass parameters to my app, this URL = "http://site.com/app/?a=alpha&b=beta" also displays the correct page, and my PHP code can see the parameters in $_GET['a'] and$_GET['b'].

    Here is where I need help with ".htaccess"

    I want this URL = "http://site.com/app/alpha/beta" to be rewritten using the Apache2 mod_rewrite engine to become "http://site.com/app/?a=alpha&b=beta" and then display the correct page (like item 3) above.

    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 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 much appreciated.

    thanks in advance,

    David Jones

    http://dxjones.com

  2. Sorry, you are in the wrong forum and need to head over to http://wordpress.ORG/support/ as that is where self-hosted wordpress blogs using the software from wordpress.ORG are supported.

    These forums are for those hosted here on the wordpress.COM free hosting service and things here work differently and our answers typically will not work for you.

    If you do not know the difference, see this support document: http://en.support.wordpress.com/com-vs-org/ .

    And NEVER put your email address in an open public forum as the spammers will find it and flood your inbox with all sorts of stuff.

  3. Slick, can you fix the email addy?

  4. @tess, so still no super powers?

  5. Removed email address. Thanks!

  6. Oh, LOL.

    My super-woman costume must not be ready for the Bridge Over Troubled Waters scenario…

Topic Closed

This topic has been closed to new replies.

About this Topic