Exclude admin directory

Oh, the strange things mod_rewrite does!

Exclude admin directory

Postby antonhilman » Sat Jul 09, 2011 8:26 am

dear all,

i use htaccess in root

Code: Select all
Options +FollowSymLinks

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} -f [NC,OR]
RewriteCond %{REQUEST_FILENAME} -d [NC]
RewriteRule .* - [L]

RewriteRule ^admin(/.*)?$ - [L]

RewriteBase /

#modul
RewriteRule ^([^/]+)/?$ index.php?mod=$1 [QSA,L]
RewriteRule ^([^/]+)/halaman/([0-9]+)/?$ index.php?mod=$1&hal=$2 [QSA,L]

#kategori modul
RewriteRule ^([^/]+)/kategori/([^/]+)/([0-9]+)/?$ index.php?mod=$1&kat=$3 [QSA,L]
RewriteRule ^([^/]+)/kategori/([^/]+)/([0-9]+)/halaman/([0-9]+)/?$ index.php?mod=$1&kat=$3&hal=$4 [QSA,L]

#detail konten
RewriteRule ^([^/]+)/([0-9]+)/[^/]+\.html$ index.php?mod=$1&id=$2 [QSA,L]
RewriteRule ^([^/]+)/([0-9]+)/[^/]+\.html/halaman/([0-9]+)/?$ index.php?mod=$1&id=$2&hal=$4 [QSA,L]

RewriteRule (.*)\.xml(.*) $1.php$2 [nocase]


SEF is oke but when i login to admin and try to entri new content it back to domain/admin
ex: http://www.domain.com/admin/mod_konten.php?act=add
or when i click http://www.domain.com/admin/mod_konten.php

it back to login page at http://www.domain.com/admin

i already try all way ini this forum but did not success, ricardk please help me.
antonhilman
 
Posts: 13
Joined: Sat May 02, 2009 6:48 pm

Return to Idiosyncrasies

Who is online

Users browsing this forum: Alexa [Bot] and 1 guest

cron