Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>The simplest way to achieve what you're trying to do would be to move Codeigniter's <code>index.php</code> file into your <code>public_html/</code> folder and update the <code>$system_folder</code> and <code>$application_folder</code> paths to point to your <code>b1/</code> folder. Example below:</p> <p><strong><code>/public_html/index.php</code></strong></p> <pre><code>/* *--------------------------------------------------------------- * SYSTEM FOLDER NAME *--------------------------------------------------------------- * * This variable must contain the name of your "system" folder. * Include the path if the folder is not in the same directory * as this file. * */ $system_path = 'b1/system'; /* *--------------------------------------------------------------- * APPLICATION FOLDER NAME *--------------------------------------------------------------- * * If you want this front controller to use a different "application" * folder then the default one you can set its name here. The folder * can also be renamed or relocated anywhere on your server. If * you do, use a full server path. For more info please see the user guide: * http://codeigniter.com/user_guide/general/managing_apps.html * * NO TRAILING SLASH! * */ $application_folder = 'b1/application'; </code></pre> <p>This will 'internally' tell Codeigniter that all your application stuff is in the <code>b1/</code> folder, but from an end-user perspective your domains will still look like <code>mydomain.com/controller/function</code></p> <p>Your <code>.htaccess</code> file will then look like this:</p> <p><strong><code>/public_html/.htaccess</code></strong></p> <pre><code>RewriteEngine on RewriteBase / # redirect any actual requests for your b1 folder # back to the web root RewriteRule ^b1/(.*)$ /$1 [R=301,L,NC] # remove index.php from the url RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 </code></pre> <p>You shouldn't then have any need for a <code>.htaccess</code> file in the <code>b1</code> folder.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload