Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > BOOK: Professional CodeIgniter ISBN: 978-0-470-28245-8
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old November 23rd, 2011, 12:26 PM
Registered User
Points: 46, Level: 1
Points: 46, Level: 1 Points: 46, Level: 1 Points: 46, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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 :
www.claudia.com/index.php/welcome/about_us
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 ?

thanks.
Reply With Quote
Reply


Thread Tools
Display Modes

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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
.htaccess mkgupta.mca MySQL 0 August 14th, 2006 04:03 AM
.htaccess question cfemocha BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 3 October 5th, 2004 11:36 PM
.htaccess file ruhin Beginning PHP 3 June 23rd, 2004 10: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 03:27 PM



All times are GMT -4. The time now is 09:20 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.