Wrox Programmer Forums
BOOK: Professional CodeIgniter ISBN: 978-0-470-28245-8
This is the forum to discuss the Wrox book Professional CodeIgniter by Thomas Myer; ISBN: 9780470282458
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional CodeIgniter ISBN: 978-0-470-28245-8 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old November 23rd, 2011, 12:26 PM
Registered User
Join Date: Nov 2011
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default i cant understand the htaccess regex logic !

1)RewriteEngine on
2)RewriteBase /ci/
3)RewriteCond $1 !^(index\.php|images|captcha|css|js|robots\.txt)
4)RewriteRule ^(.*)$ /ci/index.php/$1 [L]
thats my htaccess file , as i understand this should remove the index.php file ok , but i dont understand how it do it exactly .

Q1) what the command in line 3 do exactly ?

Q2) line number 3 capture any url that do not start with index.php
like for example www.claudia.com/welcome/about_us
now $1 = welcome/about_us
line number 4 redirect this $1 to its real path :
do i understand right ?

Q3) as i understand this htaccess will prevent any url that start with index.php or images or captcha or css or js or robots.txt ,
my question here what will happen if our script need to download somthing from /images/ by an ajax call ? the htaccess will prevent this call from targeting this directory?

Q4)the same question 3 but regarding how search engine robots will use robots.txt if this htaccess dont redirect to this file ?


Similar Threads
Thread Thread Starter Forum Replies Last Post
.htaccess mkgupta.mca MySQL 0 August 14th, 2006 03:03 AM
.htaccess question cfemocha BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 3 October 5th, 2004 10:36 PM
.htaccess file ruhin Beginning PHP 3 June 23rd, 2004 09:31 PM
Mixing Data access logic and business logic polrtex BOOK: Professional Jakarta Struts 0 December 15th, 2003 07:19 PM
.htaccess percy PHP How-To 1 July 2nd, 2003 02:27 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.