Announcement

Collapse
No announcement yet.

.htaccess conflict with Wordpress in main folder

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Wayne Luke
    replied
    AS specified, it should work. If it doesn't then you need to contact your host and make sure overrides are allowed in all directories.

    Leave a comment:


  • sojosojo
    replied
    bump

    Leave a comment:


  • sojosojo
    replied
    WP on root:

    Code:
    # 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
    
    
    
    # Use PHP 5.3
    AddType application/x-httpd-php53 .php
    Forum (yes, it's in a subdir named 'forum'

    Code:
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /forum/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?routestring=$1 [L,QSA]
    
    #needed because admincp is an actual directory.
    RewriteRule ^(admincp/)$ index.php?routestring=$1 [L,QSA]
    </IfModule>

    Leave a comment:


  • Justin Wheeler
    replied
    What are your two .htaccess files now?

    And stupid question but the forum is actually in a subfolder called forum isn't it?

    Leave a comment:


  • sojosojo
    replied
    Thanks guys, but I tried both suggestions and neither worked. I see this is a popular topic - is anything being done to prevent/correct it in an update? (again, new to vBulletin all together so I'm not sure how updates and things work).

    Leave a comment:


  • Justin Wheeler
    replied
    My guess is that you need to remove this part from the wordpress .htaccess and just have it in the forum .htaccess.

    Not sure what the Use PHP 5.3 bit is and where that is needed, I didn't have it in mine so that may or may not need to remain in the wordpress .htaccess.

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /forum
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?routestring=$1 [L,QSA]

    #needed because admincp is an actual directory.
    RewriteRule ^(admincp/)$ index.php?routestring=$1 [L,QSA]
    </IfModule>

    Leave a comment:


  • Wayne Luke
    replied
    Change: RewriteBase /forum

    To:
    RewriteBase /forum/

    Leave a comment:


  • sojosojo
    replied
    Same problem. New to vBulletin. Fresh successful install of vB5 Beta 17. Forum loads fine, can't login to admincp (I see login screen, enter login data, blank page).

    I read above and some other threads, have tried some things, but nothing is working.

    Wordpress installed on ROOT / vB5 installed in subdir named FORUM.

    I have .htaccess on root (which I modified like 'Justin Wheeler' did above) and I also have .htaccess in the 'forum' dir.

    Server info:
    Apache version 2.2.22
    PHP version 5.2.17
    MySQL version 5.5.23-55
    Operating system linux
    Perl version 5.8.8

    Root htaccess:

    Code:
    # 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
    
    
     <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /forum
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?routestring=$1 [L,QSA]
    
    #needed because admincp is an actual directory.
    RewriteRule ^(admincp/)$ index.php?routestring=$1 [L,QSA]
    </IfModule>
    
    # Use PHP 5.3
    AddType application/x-httpd-php53 .php
    'forum' subdir htaccess:

    Code:
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /forum
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?routestring=$1 [L,QSA]
    
    #needed because admincp is an actual directory.
    RewriteRule ^(admincp/)$ index.php?routestring=$1 [L,QSA]
    </IfModule>
    
    # Use PHP 5.3
    AddType application/x-httpd-php53 .php

    Leave a comment:


  • LNS
    replied
    Worked beautifully for me! This was the first time I'd run into that particular combo -- WordPress in the root and vBulletin 5 in a directory -- and that one-line change was all I needed. I've had WordPress at the root of other forum sites but never vBulletin 5. Thanks for the very timely post!

    Leave a comment:


  • Justin Wheeler
    replied
    Thanks Wayne, The RewriteRule was also one I tried on my way to get it working.

    The only one that did the job was the RewriteBase, so as long as it won't have any adverse effects I hope I will be okay!

    Leave a comment:


  • Wayne Luke
    replied
    To have your parent directory ignore the forum directory you would add this to the .htaccess:

    RewriteRule ^forum/ - [L]

    Using RewriteBase can also resolve the issue because it resets the rewrite rules as far I am aware.

    Unfortunately adding this by default isn't possible either.

    Leave a comment:


  • Justin Wheeler
    replied
    Thanks. For others who have a similar problem and having spent probably 12 hours in total trying to get this to work, the problem ended up being pretty simple!

    Adding in rewritebase /forum (change forum to your subdirectory) into the vbulletin htaccess seems to solve it, as per line 2 in the below vbulletin .htaccess..

    If any htaccess gurus happen to see this and think that is a very bad idea, please let me know. Otherwise i am happy as I can now actually start to use my forum!

    Code:
    RewriteEngine On
    RewriteBase /forum
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?routestring=$1 [L,QSA]
    
    
    #needed because admincp is an actual directory.
    RewriteRule ^(admincp/)$ index.php?routestring=$1 [L,QSA]
    Last edited by Justin Wheeler; Wed 31st Oct '12, 6:48am.

    Leave a comment:


  • Zachery
    replied
    I'd suggest going to them about asking how to turn rewrites off for a specific subfolder.

    Leave a comment:


  • Justin Wheeler
    replied
    Thanks.

    Unfortunately that didn't seem to make any difference.

    It's all rather frustrating....

    I can't really lose my .htaccess for wordpress, although at the moment it seems the only way I can get this to work.

    Leave a comment:


  • Zachery
    replied
    Try changing your wordpress htaccess:

    Code:
    # BEGIN WordPress<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    # if request is not for the /sub-dir/
    RewriteCond %{REQUEST_URI} !^/sub-dir/ [NC]
    RewriteRule . /index.php [L]
    
    
    
    
    #----- START DAP -----
    RewriteCond %{REQUEST_FILENAME} -f 
    RewriteCond %{REQUEST_FILENAME} !-d 
    RewriteCond %{REQUEST_FILENAME} (.*)/wp-content/uploads/(.*) 
    RewriteCond %{REQUEST_FILENAME} !(.*)(\.php|\.css|\.js|\.jpg|\.gif|\.png|\.txt|\.ico|\.jpeg)$ 
    # if request is not for the /sub-dir/
    RewriteCond %{REQUEST_URI} !^/sub-dir/ [NC]
    RewriteRule (.*) /dap/client/website/dapclient.php?dapref=%{REQUEST_URI}&plug=wp&%{QUERY_STRING}  [L] 
    #----- END DAP -----
    
    
    </IfModule>
    Taken from here: http://stackoverflow.com/questions/9...htaccess-rules

    Try chaging sub-dir to the vbulletin folder name.

    Leave a comment:

Related Topics

Collapse

Working...
X