BTC USD 81,880.0 Gold USD 4,165.56
Time now: Jun 1, 12:00 AM

Pretty Permalinks Untuk Wordpress Kalau Guna Lighthttpd

skycrew

Fun Poster
Messages
434
Joined
Dec 2, 2007
Messages
434
Reaction score
1
Points
15
ni aku copy/paste dari beberape forum yg aku dah tanye, tapi msih takde input lagi. harap korang dapat membantu

I have 2 blog running in one domain.

1) www.domain.net/blog/
2) subdomain.domain.net

before this, Im using Apache

this are the mod rewrite for 1st blog in apache:

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

and this are the mod rewrite for the 2nd blog:

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

after I change my shared hosting to VPS, I only can use lighthttpd. So I google about this and find this code:

url.rewrite-once = (
“^/(wp-. ).*/?” => “$0″,
“^/(sitemap.xml)” => “$0″,
“^/(xmlrpc.php)” => “$0″,
“^/keyword/([A-Za-z_0-9-] )/?$” => “/index.php?keyword=$1″,
“^/.*?(?.*)?$” => “/index.php$1″
)

the code works great for the 2nd blog, but not for my 1st blog. I can access www.domain.net but if I click hyperlink to www.domain.net/blog I will get 404 error.

anyone can help me??
 
ok dha dapat solution, mod boleh close benang ni
 
ok dha dapat solution, mod boleh close benang ni

Camana solution tu bro..? Leh tau tak mana tau kot2 jadik di masa depan lak kes nie.. sebab kes 404 saya dulu saya letak benda nie

Code:
RewriteOptions MaxRedirects=9999

p/s: t-shirt bile nak siap nie.. hehe
 
mula2 aku buat mcm ni

- ni utk blog yg dlm directory
$HTTP["host"] =~ "(^|www\.)skycrewz\.net" {
server.document-root = "/home/lxadmin/httpd/default/"
server.error-handler-404 = "/blog/index.php"
}

- ni utk default
$HTTP["host"] =~ "freemovie.skycrewz.net" {
server.document-root = "/home/lxadmin/httpd/default/"
server.error-handler-404 = "/index.php"
}

tapi kalo gune VPS tu sorang2 boleh le buat cmtu, so

letak server.error-handler-404 = "/index.php" dekat dlm file (domain).lighthttpd
 
Back
Top
Log in Register