ワンクリックで
codeigniter-url-resolution
Use when: ensuring a CodeIgniter application resolves URLs correctly on local/test and production hosts.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Use when: ensuring a CodeIgniter application resolves URLs correctly on local/test and production hosts.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Use when: bootstrapping a new front-end project with Bootstrap. Provides a quick checklist to set up HTML, CSS, JS structure and integrate Bootstrap framework.
Use when: setting up a new CodeIgniter project or following development best practices. Provides a quick checklist for installation, configuration, and MVC structure.
Use when: preparing a CodeIgniter project for open source release. Provides a quick checklist for licensing, documentation, and code commenting.
Use when: implementing testing in CodeIgniter projects. Provides a quick checklist for best practices and acceptance testing at each stage.
Use when: setting up version control or following Git best practices in projects. Provides a quick checklist for Git setup and workflows.
| name | codeigniter-url-resolution |
| description | Use when: ensuring a CodeIgniter application resolves URLs correctly on local/test and production hosts. |
This skill explains how to write a CodeIgniter application so URLs resolve correctly across different hosts and environments.
public folder as the web server document root.app.baseURL.app/Config/App.phpenv('app.baseURL') so production and test hosts can provide their own value.rtrim() and add a trailing slash.Example pattern used in this app:
public string $baseURL = 'http://localhost:8080/';
public function __construct()
{
parent::__construct();
$configuredBaseURL = rtrim((string) env('app.baseURL', $this->baseURL), '/');
$this->baseURL = ($configuredBaseURL === '' ? $this->baseURL : $configuredBaseURL) . '/';
}
.env and environment variables.env file in development and test environments.Example .env values:
app.baseURL = 'http://localhost:8080/'
Production example:
app.baseURL = 'https://example.com/'
If your application runs in a subdirectory:
app.baseURL = 'https://example.com/subfolder/'
public/ as the document root.public/, use front-controller bootstrap logic carefully.public/.htaccess to route requests to index.php and remove index.php from URLs.If public/.htaccess is active, set:
public string $indexPage = '';
and keep uriProtocol at REQUEST_URI for normal server behavior.
base_url() and site_url() in views and templates.Example:
<a href="<?= base_url('dashboard') ?>">Dashboard</a>
app.baseURL to match their HTTP host.app.baseURL to the live domain.allowedHostnames if the app should accept additional hostnames besides the configured base URL.public is the document root and .htaccess rewrite rules are working.base_url() generates the wrong host, check the app.baseURL environment setting.indexPage is set to an empty string and the server rewrite module is enabled.public directory as the entry point.