{"id":14966534,"url":"https://github.com/ilopx/yii2-basic-htaccess","last_synced_at":"2025-10-25T16:30:55.810Z","repository":{"id":26344127,"uuid":"29792962","full_name":"ilopX/yii2-basic-htaccess","owner":"ilopX","description":"File htaccess for yii2 basic","archived":false,"fork":false,"pushed_at":"2015-08-24T13:59:30.000Z","size":295,"stargazers_count":71,"open_issues_count":0,"forks_count":31,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-01-31T08:05:59.693Z","etag":null,"topics":["htaccess","php","yii","yii2-basic"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ilopX.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-24T21:52:31.000Z","updated_at":"2024-11-15T16:42:02.000Z","dependencies_parsed_at":"2022-08-27T00:11:42.669Z","dependency_job_id":null,"html_url":"https://github.com/ilopX/yii2-basic-htaccess","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilopX%2Fyii2-basic-htaccess","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilopX%2Fyii2-basic-htaccess/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilopX%2Fyii2-basic-htaccess/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilopX%2Fyii2-basic-htaccess/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ilopX","download_url":"https://codeload.github.com/ilopX/yii2-basic-htaccess/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238174152,"owners_count":19428633,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["htaccess","php","yii","yii2-basic"],"created_at":"2024-09-24T13:36:33.163Z","updated_at":"2025-10-25T16:30:55.453Z","avatar_url":"https://github.com/ilopX.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"#Yii2 basic htaccess\n\n![Demo](https://github.com/ilopX/yii2-basic-htaccess/blob/master/example.png)\n\n## Video Demo\n[![Video Demo](http://img.youtube.com/vi/0sxqNaznhlc/0.jpg)](http://www.youtube.com/watch?v=0sxqNaznhlc)\n\n## a. Automatic setting [index.php](https://cdn.rawgit.com/ilopX/yii2-basic-htaccess/master/index.php)\nThis method created .htaccess files automatically and clear self.\n\n+ Download file [index.php](https://cdn.rawgit.com/ilopX/yii2-basic-htaccess/master/index.php) or composer require ilopx/yii2-basic-htaccess\n+ Put to root yii2 application\n+ Start http://{your_yii2_webapp}\n+ Follow [step 3 in Manual setting](#3-step) \n\n## b. Manual setting\n### 1. step\n#### create file {root}/.htaccess:\n```\n\u003cIfModule mod_rewrite.c\u003e\n    Options +FollowSymlinks\n    RewriteEngine On\n\u003c/IfModule\u003e\n \n\u003cIfModule mod_rewrite.c\u003e\n    RewriteCond %{REQUEST_URI} ^/.*\n    RewriteRule ^(.*)$ web/$1 [L]\n\n    RewriteCond %{REQUEST_URI} !^/web/\n    RewriteCond %{REQUEST_FILENAME} !-f [OR]\n    RewriteCond %{REQUEST_FILENAME} !-d\n    RewriteRule ^.*$ web/index.php\n\u003c/IfModule\u003e \n```\n\n### 2. step \n#### create file {root}/web/.htaccess:\n```\nRewriteCond %{REQUEST_FILENAME} !-f\nRewriteCond %{REQUEST_FILENAME} !-d\nRewriteRule . index.php\n```\n### 3. step\n#### update file {root}/config/web.php:\n```php\n'request' =\u003e [\n    'baseUrl' =\u003e '',\n],\n'urlManager' =\u003e [\n    'enablePrettyUrl' =\u003e true,\n    'showScriptName' =\u003e false,\n    'rules' =\u003e [\n        '' =\u003e 'site/index',\n        '\u003caction\u003e'=\u003e'site/\u003caction\u003e',\n    ],\n],\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filopx%2Fyii2-basic-htaccess","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Filopx%2Fyii2-basic-htaccess","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filopx%2Fyii2-basic-htaccess/lists"}