icon Learn how to get the most out of Surmunity - read our forum tips here! | Welcome! Please register to access all of our features.
Old January 18th, 2008, 11:25 PM   #1 (permalink)
Registered User
Fresh Surpasser
 
Joined in Jun 2005
5 posts
Gave thanks: 1
Thanked 0 times
Wordpress and Clean Urls/Htacess Help

Hi,

I'm having some trouble getting Wordpress to work with clean urls via my .htacess file. I've done this before with several different hosts, so I'm not sure what the problem is.

Currently my site is temporarily here: http://sh100.surpasshosting.com/~sweptawa/

I've changed my WP Permalinks options so as to not include /index.php/ and tried following the steps mentioned here:
http://www.surmunity.com/showthread.php?t=22561


I've tried several mod_rewrite rules, none of them working. Any clue what is wrong?

Thanks!
AskedRelic is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old January 19th, 2008, 12:16 AM   #2 (permalink)
Registered User
Fresh Surpasser
 
Joined in Jun 2005
5 posts
Gave thanks: 1
Thanked 0 times
Well nevermind for the moment, I've broken everything.
AskedRelic is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old January 19th, 2008, 2:50 AM   #3 (permalink)
Race Surpass
Super #1
 
MarkRH's Avatar
 
Joined in Jul 2006
Lives in Oklahoma City, OK
Hosted on sh102
1,176 posts
Gave thanks: 18
Thanked 85 times
Well, one thing you will most likely need to do with Wordpress is edit the \wp-includes\vars.php file to force $is_apache to be true in the Server detection section near the bottom:
PHP Code:
// Server detection
//$is_apache = ((strpos($_SERVER['SERVER_SOFTWARE'], 'Apache') !== false) || (strpos($_SERVER['SERVER_SOFTWARE'], 'LiteSpeed') !== false)) ? true : false;
$is_apache true;
$is_IIS = (strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS') !== false) ? true false
The reason is that $_SERVER['SERVER_SOFTWARE'] has a value of "WebServerX" most likely.

After doing that, then Wordpress will modify the .htaccess file how it sees fit. Here's the Wordpress portion of mine:

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

# END WordPress
Hope it helps,
Mark H.
MarkRH is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
These users thank MarkRH for this great post!
AskedRelic (January 19th, 2008), Noho Rob (April 20th, 2008)
Old January 19th, 2008, 11:40 AM   #4 (permalink)
Registered User
Fresh Surpasser
 
Joined in Jun 2005
5 posts
Gave thanks: 1
Thanked 0 times
Excellent, that was exactly it. Thanks for the advice!
AskedRelic is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On