homepage Welcome to WebmasterWorld Guest from 184.72.69.79
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
mod rewrite done on index.php,
gives error on 'admin' folder
dopecoder




msg:1524213
 1:07 am on Jun 28, 2006 (gmt 0)

ive done some mod rewrite for a wordpress blog on index.php. its all working fine except that when i go 'http://www.example.com/admin/' where admin is a folder, it parses it as if admin is a parameter to the index.php file and give errors.

can i have write some exception on the .htaccess to avoid that? or any other ideas on what i can do?

 

jdMorgan




msg:1524214
 1:27 am on Jun 28, 2006 (gmt 0)

See the RewriteCond [httpd.apache.org] directive of mod_rewrite. Used with a negative pattern for %{REQUEST_URI}, it can exclude a folder or filepath from being rewritten.

This comes in handy, unless you really want to rewrite all requests -- including those for image files, robots.txt, and everything else, to your script.

Jim

dopecoder




msg:1524215
 1:51 am on Jun 28, 2006 (gmt 0)

thanks jdMorgan for the information,

im not much into programming so couldnt make much sence of what was written, can i have an example / sample of a RewriteCond that would exclude 'admin' folder

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved