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

  • Home
  • SEARCH
  • 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 9037753
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T09:19:10+00:00 2026-06-16T09:19:10+00:00

Currently everything is working golden except for the fact that a user could manually

  • 0

Currently everything is working golden except for the fact that a user could manually put in a URL, which messes up how CI is setup for my site. For instance:

www.somesite.com/folder/

this folder in the controller should not be accessible… and needs to redirected to that folders index page, which will give them a 404 error. I’ve tried adding deny to all in the htaccess file, but it doesn’t seem to do anything.

www.somesite.com/folder/index.html

I actually want all folders to function likes this. I do have an index.html file in the folder, but it doesn’t get read. Is there a way to fix this in CI? I’m also having an issue with users being able to manually access the controller functions. I’ve tried to change them to private as people have suggested, but then my scripts can’t access them. For instance:

www.somesite.com/controller_file/some_function

How do I block them from accessing this function?

  • 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-16T09:19:11+00:00Added an answer on June 16, 2026 at 9:19 am

    You can create a whitelist sollution:

    1. Open your application/config/routes.php
    2. add the routes you want to allow.
    3. add a catchall route .* And redirect it to a errot handler

    Codeigniters trys to matches the route patterns in the order they are listed in the array so
    whenever a user enters a route you did not explicitly allow it will allqays redirect him to the catchall route

    user-guide on routing

    EDIT:
    You can create a blacklist logic by redirecting only requests matching a specific pattern, and keep the default behaviour for all others.

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

Sidebar

Related Questions

I'm currently using Microsoft Sync Framework and everything is working fine except the SQL
I am currently implementing a ListView populated with CheckedTextViews and have everything working just
I'm using Rails 3.2, Carrierwave and simple_form. Currently, everything is working fine with one
Currently I am working on a SilverStripe project, and everything seems to be running
I currently have a thread that I created using CreateRemoteThread(). Everything works great. Upon
I am currently working on a project that consists of an ASP.NET MVC 2.0
I am currently working on a project which features a plugin-like system. Once the
I am working on implementing tabs for my application. Everything is working well except
I'm currently working with an existing application that defines a couple constants on the
I am currently using wp_nav_menu to generate my nav menu. Although everything is working

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.