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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:12:52+00:00 2026-05-28T01:12:52+00:00

This is the url http://rapidsurfing.net/visio/xip8yT My site is developed in codeigniter. So when link

  • 0

This is the url

http://rapidsurfing.net/visio/xip8yT

My site is developed in codeigniter. So when link this above url I want to go to one controller function. How can I do this using htaccess.

This is my httaccces code

<IfModule mod_rewrite.c>
   RewriteEngine on
   RewriteRule    ^p\/(.*)$ page.php?q=$1 [L]
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^(.*)$ index.php?admin/index/url=$1 [QSA,L]
</IfModule>

The url have value xip8yT.The admin is the controller name and index is the function in that controller.

But when I paste the url http://rapidsurfing.net/visio/xip8yT in address bar it load 404 not found error.
What is the problem or mistake in my code?
My default controller is admin.

  • 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-28T01:12:53+00:00Added an answer on May 28, 2026 at 1:12 am

    First make sure you set up your default controller in routes.php file. A complete answer to your question is the way that I worked with CI. CodeIginter itself recommend to use a .htaccess for redirecting all of requests to your index page and your default controller and it’s what you did. But I recommend to use this piece of code:

    <IfModule mod_rewrite.c>
    
        RewriteEngine On
        RewriteBase /yourbasefoldername
    
        ### Canonicalize codeigniter URLs
    
        # If your default controller is something other than
        # "welcome" you should probably change this
        RewriteRule ^(yourdefaultcontrollername(/index)?|index(\.php)?)/?$ / [L,R=301]
        RewriteRule ^(.*)/index/?$ $1 [L,R=301]
    
        # Removes trailing slashes (prevents SEO duplicate content issues)
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule ^(.+)/$ $1 [L,R=301]
    
        # Enforce www
        # If you have subdomains, you can add them to 
        # the list using the "|" (OR) regex operator
        # RewriteCond %{HTTP_HOST} !^(www|subdomain) [NC]
        # RewriteRule ^(.*)$ http://localhost/dfgamez/$1 [L,R=301]
    
        # Enforce NO www
        # RewriteCond %{HTTP_HOST} ^www [NC]
        # RewriteRule ^(.*)$ http://localhost/dfgamez/$1 [L,R=301]
    
        ###
    
        # 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]
    
        # 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]
    
    </IfModule>
    
    <IfModule !mod_rewrite.c>
    
        # Without mod_rewrite, route 404's to the front controller
        ErrorDocument 404 /index.php
    
    </IfModule>
    

    Simply you’ll get every slashes after the site address to your index function parameters.

    Peace Out!

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

Sidebar

Related Questions

I have this url: http://www.mydomain.com/index.html And want a rule to rewrite the above into
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.
Say I have this url: http://site.example/dir/ In this folder I have these files: test.ascx.cs
How can I hide the parameters in Codeigniter? I have this URL: http://example.com/profile/1 I
Given this URL: http://www.dreamincode.net/forums/xml.php?showuser=1253 How can I download the resulting XML file and have
Take a look at this URL: http://download.mozilla.org/?product=firefox-9.0.1&os=win&lang=nl It is the direct link to download
I have this url: http://mysite.com/home.php?name=username I want to be able to access that by
I want to take this URL: http://www.awesomehost.com/accountants/Ceribelli-Associates-cd01qazwsxoztfnlvsim.html And redirect it to: http://www.awesomehost.com/accountants/accountant-directory.php?ID=cd01qazwsxoztfnlvsim And here's
I have this url: http://www.site.com/en/about.php?id=112&name=andrew marshall dickens and i would like to rewrite it
I have this url: http://www.site.com/products-book_1.aspx?promo=free Here is what I have in my web.config for

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.