Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7840357
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T15:45:20+00:00 2026-06-02T15:45:20+00:00

I added the following to my CodeIgniter project to my .htaccess in order to

  • 0

I added the following to my CodeIgniter project to my .htaccess in order to remove the index.php:

#Removes access to the system folder by users.
#Additionally this will allow you to create a System.php controller,
#previously this would not have been possible.
#'system' can be replaced if you have renamed your system folder.
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]

#When your application folder isn't in the system folder
#This snippet prevents user access to the application folder
#Submitted by: Fabdrol
#Rename 'application' to your applications folder name.
RewriteCond %{REQUEST_URI} ^application.*
RewriteRule ^(.*)$ /index.php?/$1 [L]

#Checks to see if the user is attempting to access a valid file,
#such as an image or css document, if this isn't true it sends the
#request to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]

Everything worked fine. My URLs no longer need index.php in the.

However, this has created an interesting side effect such that when I try to login using Facebook OAuth, I get the following error:

The webpage at
=”>https://www.facebook.com/dialog/oauth?client_id=123&redirect_uri=http%3A%2F%2Fwww.domain.com%2Fsign_in%2Ffacebook%2F&state=8f3d1e5de60e47935460564a41f35af3&scope=email#=
has resulted in too many redirects. Clearing your cookies for this
site or allowing third-party cookies may fix the problem. If not, it
is possibly a server configuration issue and not a problem with your
computer.

NOTE: client id and redirect URI have been changed for privacy.

I’m using the PHP SDK 3.1.1 https://github.com/facebook/php-sdk and followed the sample code on http://developers.facebook.com/blog/post/503/. When I still had index.php in my URLs, everything worked fine. The problem seem to have started after I added the the rewrite rules to remove index.php.

Any ideas what’s going on and how to fix this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T15:45:22+00:00Added an answer on June 2, 2026 at 3:45 pm

    Try to following patch:
    In system/core/config.php file, in site_url method replace the following line
    return $this->slash_item(‘base_url’).$this->slash_item(‘index_page’).$this->_uri_string($uri).$suffix;
    with new code:
    return $this->slash_item(‘base_url’).$this->_uri_string($uri).$suffix;

    It might get working…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to know following: I added the folder Graphics into my project
I'm using following htaccess rule which is proposed all over internet for removing index.php
I'm trying to access CodeIgniter URLs without 'index.php'. Here's the steps I've taken: Checked
For my project I have added following line of code in applicaiton.ini resources.layout.layoutPath =
I have added following lines into php.ini [XDebug] zend_extension = C:\PROGRA~1\PHP5\ext\php_xdebug-2.1.0-5.3-vc9.dll xdebug.remote_enable=on xdebug.remote_handler=dbgp xdebug.remote_host=localhost
I have been tried to make my first Hibernate project. I added following libraries
I'm using CodeIgniter and I added some rules in .htaccess to redirect all requests
I have added following lines at start of %PRPOGRA~%\Notepad++\plugin\APIs\php.xml <KeyWord name=$_GET></KeyWord> <KeyWord name=$_POST></KeyWord> <KeyWord
I added following command to Sessions -> Startup program but it didn't work. I'm
I added following line of code in .vimrc let g:jslint_status = 'enabled' if exists(jslint_status)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.