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 1058687
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T18:03:37+00:00 2026-05-16T18:03:37+00:00

My codeigniter application directory structure is like –application –htdocs    –index.php    –.htaccess   

  • 0

My codeigniter application directory structure is like

–application
–htdocs
  
–index.php
  
–.htaccess
  
–folder
      
–file1.xml

Now I have a url http://mysite.com/folder. This is showing the files list in the folder directory. What I want here is to rewrite this url to a controller on my site say ‘html.php’.

Note: I do not want to redirect. I want the url to be same but instead of showing folder contents, I want to pass the control to a controller. What .htaccess rule should I write?

  • 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-05-16T18:03:38+00:00Added an answer on May 16, 2026 at 6:03 pm

    have you looked at url routing?

    ie

    $route[‘folder’] = “html”; //html is your controller

    http://www.yoursite.com/folder

    will “redirect” to yoursite.com/html but won’t change the URL.

    no need to mess with htaccess

    edit:

    RewriteEngine On
    RewriteBase /
    
    #ignored folders/files
    RewriteCond $1 !^(index\.php|robots\.txt|img/|css/|js/)
    
    RewriteRule ^(.*)$ index.php?/$1 [L] 
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    

    obtained from – http://codeigniter.com/forums/viewthread/153228/

    perhaps this is what you are after?

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

Sidebar

Ask A Question

Stats

  • Questions 541k
  • Answers 541k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I suspect you are typing that entire build line you… May 17, 2026 at 2:49 am
  • Editorial Team
    Editorial Team added an answer Turns out I was just ensuring the wrong tables. In… May 17, 2026 at 2:49 am
  • Editorial Team
    Editorial Team added an answer Here's a nice jQuery plugin. Shows weeks at a time.… May 17, 2026 at 2:49 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

Hello I just started working with CodeIgniter framework. My current directory structure is Demo(Project
I am considering using CodeIgniter as the framework for my next web-application. However, I
I have tried by myself to install Rediska (Redis PHP client) into my codeigniter
could i use one codeigniter framework directory to create multiple applications? cause it seems
my host account is something like: ~ ~/public_html ~/public_html/system/application to access my web, I
I have a problem with CodeIgniter .htaccess file and hope that somebody can help
I am creating a modular CMS using the codeigniter framework, the main asset directory
I am using codeigniter and below is my htaccess file. However, i want a
I am about to launch a CodeIgniter web application. Any recommendations on what I
I am writing a web application using Codeigniter for a client and am using

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.