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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T19:03:37+00:00 2026-06-06T19:03:37+00:00

I want my URL’s to look like: www.domain.com/controller/view/args instead of index.php?/controller/view/args . Actually, I

  • 0

I want my URL’s to look like: http://www.domain.com/controller/view/args instead of index.php?/controller/view/args. Actually, I NEVER want the url “index.php?…” to validate. Can anybody give me a hint on how to enforce this behavior, because when I do: A) redirect() or B) type in manually ‘index.php'”…” the url changes to that ugly pattern.

This is my .htaccess file (I don’t know if I need this file, just copy+pasted from the internet):

#http://codeigniter.com/wiki/Godaddy_Installaton_Tips/

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

This is my config.php:

$config['base_url'] = '';
$config['index_page'] = 'index.php?';
$config['uri_protocol'] = 'AUTO';
$config['enable_query_strings'] = FALSE;

And this is what changes the behaviour:

redirect('...blah', 'either location or refresh');
  • 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-06T19:03:38+00:00Added an answer on June 6, 2026 at 7:03 pm

    In addition to needing to place the .htaccess in the root of the codeigniter install (in the same place as the index.php), you’ll also need to ensure that mod_rewrite is working on your Apache install, otherwise the .htaccess file will just be ignored.

    Additionally, you need to set the AllowOverride directive in your Apache virtual host (see http://httpd.apache.org/docs/2.0/mod/core.html#allowoverride) – it should be set to something like:

    <VirtualHost *:80>
    ...
    AllowOverride All
    ...
    </VirtualHost>
    

    You should also change:

    $config['index_page'] = 'index.php?';
    

    To:

    $config['index_page'] = '';
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to implemented URL like : www.domain.com/Business/Manufacturing/Category/Product1 This will give the details of
I have a URL like: http://www.google.com/test.html?d=1232&u=32 and I want to add it as a
Think of a small and basic affiliate system. I want an URL like www.myshop.com/mynewproduct.html?afid=123
I'm working on a website where I want the url www.example.com/directory1/states/california.php to point to
Really simple request. I want my url to look like: http://localhost/movie/72105 instead of this
I want my url like this: http://domain.com/tag/高兴 My route mapping: routes.MapRoute(Tag, tag/{name}, new {
On a LAMP server, I want the URL http://example.com/index.php to be rewritten to simply
I have a URL which looks like localhost/myapp/index.php?mod=user&page=createuser I want the URL to look
I want this url http://www.youtube.com/watch?v=dgNgODPIO0w&feature=rec-HM-fresh+div to be transformed to: http://www.youtube.com/v/dgNgODPIO0w with php.
I want my URL to look like: localhost/website/148/category Here is my .htaccess file at

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.