0

Ideally what I'd like is

domain.com to be my wordpress blog, and

domain.com/app to be my custom java app running on a Heroku server.

I do not want to use subdomains.

Is this possible, and if so, how?

TomahawkPhant
  • 1,130
  • 4
  • 15
  • 33

1 Answers1

0

It's possible.

The only issue I can see occurring with this setup is WordPress showing 404's for the URL domain.com/app.

But there is a fix. A couple lines of Apache mod_rewrite.

Add:

  RewriteCond %{REQUEST_URI} ^/app.*$ [NC]
  RewriteRule . - [L]

To your WordPress installation's root .htaccess file. So it should look like this:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_URI} ^/app.*$ [NC]
RewriteRule . - [L]

RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

This will allow your Heroku app to bypass WordPress's iron grip of controlling all URL's within it's install location.

Giancarlo Colfer
  • 561
  • 5
  • 11