WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a client with an odd setup that I can’t quite figure out and I thought someone here might know the answer. I’m not sure they want the site shared, so I’ll use example.com for the sake of explanation.

Their wordpress URL is setup like http://example.com/blog.

However, on the server (Apache), the actual folder is called “wordpress” NOT ”blog”.

The .htaccess is located in the “wordpress” folder (full server path is /var/www/wordpress/) and looks like this:

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

# END WordPress

There is no .htaccess in /var/www/

In General Settings they have this:

  • WordPress Address: http://example.com/blog
  • Site Address: http://example.com/blog

This works fine on WordPress pages, posts and categories. But some plugins (gravity forms, nextgen) will strip out the “blog” portion of the URL when using them. So for example a Gravity Form will try to submit to http://example.com instead of http://example.com/blog which will cause an error.

My guess is that .htaccess is configured wrong but .htaccess and regular expressions are my weak point.

share|improve this question
Why not just rename the folder /wordpress/ to blog, then reset your .htaccess, from wp-admin permalinks page ? If the Gravity Forms still fails, then most likely is another plugin causing issues or somebody messed up with the wordpress core. – adrian7 Jan 6 '13 at 14:14

Ok, I've found that the form of the gravity forms had an action of "/" You can either take that out with JS or do it manually, but remember that when the plugin updates, it'll be back

share|improve this answer
Please elaborate. I don't understand the answer in all detail. Thanks. – kaiser Feb 15 '13 at 11:16
This may be specific to just gravity forms, but in search last night, if you look at the html in firebug, or view source, take a look at the <form> element and see what it's action is: <form action="/#gf-1"> that / was causing my problems, because it was in a subdirectory, / was the root url and not the page url. – Andrew Lazarus Feb 15 '13 at 17:06
Please edit your answer and include this. Thanks. – kaiser Feb 15 '13 at 17:22

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.