Problem with WordPress htaccess file?

BlackBeret

Regular Member
Joined
Jul 12, 2008
Messages
257
Reaction score
60
I just moved my site to a new server, and now I can't navigate into a subfolder on the site. My site is set up like this:

mainsite.com
mainsite.com/Blog Where the WP Blog is
mainsite.com/OtherProgram Where my other program is


When I try to visit mainsite.com/OtherProgram it keeps coming back as 404 error in the blog. It didn't do this before the move. The /OtherProgram still exists and has an index.php file.

The following is the htaccess file from the root directory:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /Blog/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /Blog/index.php [L]
</IfModule>

I don't remember if it was in the root directory before the move, but I would have thought it should have only been in the /Blog directory. I tried removing it from the root directory, but only got a different error.

Anyone have any ideas? I was going to add a 404 redirect, but it would probably just get caught in a loop.
 
Are you trying to redirect all traffic from domain.com/ to domain.com/blog/ ?

Personally I put the htaccess file for my blogs in the root folder of the WP install
 
No, I'm not trying to redirect the traffic. The site at mainsite.com still comes up and works fine.
 
Try removing the htaccess from the root
and placing the following in the root of the blog folder

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
 
It turns out to be a problem with the register_globals in the /OtherProgram .htaccess file. It needs it to be on, but I can't figure out how to do this in php 5.2.6. I guess my old server was running an older copy of php and I could turn it on with

php_value register_globals 1

in the htaccess file. 5.2.6 doesn't seem to allow php_value. It is a pretty old program, maybe I should get a new one. Everywhere I read says to leave global_registers off.
 
What directory does the php.ini go into? I can't find it. I don't want to turn on register_globals for the whole site in case it is a security risk. I only want to enable for this folder.

The error code I keep getting is:

/.htaccess: Invalid command 'register_globals', perhaps mis-spelled or defined by a module not included in the server configuration
 
Thanks everybody for the help, especially albaniax. I added the phpini.php file to the /OtherProgam folder and it seems to work now.
 
It is recommended that you leave register globals off However if needed You can change this for your site by adding a line to the .htaccess file in your root home folder:

php_value register_globals on

Im fairly sure it cannot be set for an individual folder
 
Back
Top