Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal for an updated mod_rewrite suggestion in the documentation and update of user agent string. #690

Merged
merged 5 commits into from
Nov 27, 2011

Conversation

Repox
Copy link
Contributor

@Repox Repox commented Nov 22, 2011

Adressing issue #684 as OP mistakes the current suggestion as 'incorrect', the rewrite rules could be changed into this:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]

This is a flexible solution for new developers in CI and for developers who are unexperienced with the mod_rewrite module.

One of the first questions I found on SO searching for 'codeigniter' and 'mod_rewrite' was this: http://stackoverflow.com/questions/6756181/mod-rewrite-for-codeigniter
I think questions and answers like these suggested supports the documentation suggestion.

Also updating user agent string from previous commit b8daad7 after being corrected in a comment.

Documentation for the correct user agents and user agent strings for Opera browsers can be found at http://my.opera.com/community/openweb/idopera/

philsturgeon pushed a commit that referenced this pull request Nov 27, 2011
Proposal for an updated mod_rewrite suggestion.
The existing mod_rewrite example in the documentation led to confusion with new users about how to include CSS, JS and image files.
@philsturgeon philsturgeon merged commit 6d0356b into bcit-ci:develop Nov 27, 2011
@murali118
Copy link

Hi, i face some issue on CI 2.0.. about hosting problem.. i need some one help.. this is my first project developed using CI. so i face index.php issue in base URL.. ple help me... i used .ht-access file but that file cant removing index.php.. in localhost base_url working properly, but when i hosted base URL should not work without index.php. ex: www.xxx.com/index.php/search.
.htaccess file...
RewriteEngine on
RewriteBase /xxx.com
RewriteCond $1 !^(/index.php|resources|robots.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(/index.php|css|images|js|robots.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
i face page not found error...
if i use base_url in config file like $config['base_url']= 'http://www.xxx.com/index.php'; the link should work properly..
please help me, how can i remove the index.php in CI framework when i hosted..

@Repox
Copy link
Contributor Author

Repox commented Jan 30, 2012

This is not the place to get help with your development.
I suggest you ask in CodeIgniters official forums at http://codeigniter.com/forums/ or at Stack Overflow at http://stackoverflow.com

@assertchris
Copy link

Hi, i face some issue on CI 2.0.. nah, just kidding! :P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants