• Resolved lexx21

    (@lexx21)


    We are trying to setup wordpress 3.0.1 in our environment with with sub directories (not domains). The issues that we are having is that we use an authentication product called Webgate from Oracle, which gives a more centralized login control.

    I have setup wordpress following the instructions given, added the required elements to wp-config and .htaccess. However when I use the .htaccess file as given when networking is setup, webgate doesn’t even prompt. I get a “not found” error for wp-login.php. I have to comment out the last line that says “RewriteRule . index.php [L]” before webgate will prompt for a login. However, with the rewrite rule commented out, I cannot get to any of the sub blogs that I have created.

    I have wordpress installed in htdocs and that is my web root for the virtual host that I created. Any other info that you need to help solve this, just let me know.

    The content of my wp-config file is as follows:

    define(‘WP_ALLOW_MULTISITE’, true);

    define( ‘MULTISITE’, true );
    define( ‘SUBDOMAIN_INSTALL’, false );
    $base = ‘/’;
    define( ‘DOMAIN_CURRENT_SITE’, ‘intrablog.epa.gov’ );
    define( ‘PATH_CURRENT_SITE’, ‘/’ );
    define( ‘SITE_ID_CURRENT_SITE’, 1 );
    define( ‘BLOG_ID_CURRENT_SITE’, 1 );

    The content of my .htaccess file is as follows:

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]

    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]

    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ – [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]

    Thanks in advance for any help you can provide.

Viewing 1 replies (of 1 total)
  • Thread Starter lexx21

    (@lexx21)

    I have solved the problem. If anyone is using Oracle access manager (webgate), then you will need to do the following:

    Have a webgate policy that includes protection of /index.php. Add a location match for /index.php.

    After that you can use webgate authentication with “RewriteRule . index.php [L]” uncommented.

Viewing 1 replies (of 1 total)
  • The topic ‘rewrite rule in .htaccess causes webgate to fail’ is closed to new replies.