|
|
#1 (permalink) |
|
Registered User
Comfy Contributor
|
WordPress and .htaccess generation problems
I just upgraded WordPress to 2.7, but I accidentally killed my .htaccess file and I had to create a new one. This wasn't an issue before, but now it doesn't work and it recommends me to use the option with /index.php/2008/12/my-post instead of /2008/12/my-post which I was using before without any issues.
I am wondering how come I cannot write my .htaccess anumore, regardless of the permissions...?! Did something change in the meantime? Thanks. If relevant, the domain is iva-is.me |
|
|
|
|
|
#2 (permalink) |
|
Race Surpass
Super #1
Joined in Jul 2006
Lives in Oklahoma City, OK
Hosted on sh102
1,510 posts
Gave thanks: 21
Thanked 104 times
|
You need to edit the /wp-includes/vars.php file and make $is_apache = true.
Like this: PHP Code:
I have to change it every time I upgrade. If you don't do this WordPress thinks it's not running on Apache and will not modify the .htaccess file. |
|
|
|
|
|
#3 (permalink) |
|
Registered User
Comfy Contributor
|
Thank you.
![]() I have seen this somewhere, but knowing it wasn't an issue before, I assumed it wouldn't concern hosting companies without exotic settings (the company that hosts some of my other sites has some weird settings...). |
|
|
|
|
|
#4 (permalink) |
|
Registered User
Seasoned Poster
Joined in Jan 2004
Lives in Atlanta, GA, USA
Hosted on PASS3
75 posts
Gave thanks: 8
Thanked 0 times
|
From my Wp2.7 file:
Code:
// Server detection /** * Whether the server software is Apache or something else * @global bool $is_apache */ $is_apache = ((strpos($_SERVER['SERVER_SOFTWARE'], 'Apache') !== false) || (strpos($_SERVER['SERVER_SOFTWARE'], 'LiteSpeed') !== false)) ? true : false;
__________________
Server: Pass3 (72.29.75.151) |
|
|
|
|
|
#5 (permalink) |
|
Race Surpass
Super #1
Joined in Jul 2006
Lives in Oklahoma City, OK
Hosted on sh102
1,510 posts
Gave thanks: 21
Thanked 104 times
|
$is_apache will get a value of false with that statement because $_SERVER['SERVER_SOFTWARE'] = "WebServerX" here. That's why I commented it out and just made it equal to true.
|
|
|
|
|
|
#6 (permalink) |
|
Registered User
Seasoned Poster
Joined in Sep 2003
72 posts
Gave thanks: 4
Thanked 6 times
|
i have used the same solution last year. but it made me crazy until i find the problem. i debugged nearly 10 files in wordpress. then i found that the server environment was changed in default by surpass staff. when i asked them the question why, they replied that it was a security precaution. and also they added that they cannot change it back.
anyway, if you have many wordpress installations, and also upgrade them every time, then you have to change this line of $is_apache thing... |
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|