htaccess – Server Subdirectory With Different Name Than URL Subdirectory

Community Forums Forums General Discussion htaccess – Server Subdirectory With Different Name Than URL Subdirectory

This topic is: not resolved

Tagged: 

This topic contains 1 reply, has 2 voices, and was last updated by  SoZo 1 year, 9 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #8873

    noxbane
    Participant
    Post count: 1

    So 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 “mydomain.com” for the sake of explanation.

    Their wordpress URL is setup like http://mydomain.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:

    <code>

    # 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]
    </IfModule>

    # END WordPress

    </code>

    There is no .htaccess in /var/www/

    In General Settings they have this:

    Wordpress Address: http://mydomain.com/blog

    Site Address:  http://mydomain.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://mydomain.com instead of http://mydomain.com/blog which will cause an error.

    My guess is that .htaccess is configured wrong but .htaccess and regular expressions are my weak point and I’m hoping someone can help.

    #15099

    SoZo
    Moderator
    Post count: 1573

    You’d be better off asking on the WP forums


    John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.