{"id":22792726,"url":"https://github.com/johnantoni/naked_url_for_s3","last_synced_at":"2025-03-30T17:17:52.366Z","repository":{"id":66484208,"uuid":"2234896","full_name":"johnantoni/naked_url_for_s3","owner":"johnantoni","description":"inspired by http://wwwizer.com/ a dead simple naked domain redirector","archived":false,"fork":false,"pushed_at":"2011-08-19T16:51:52.000Z","size":96,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-05T19:08:56.674Z","etag":null,"topics":[],"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/johnantoni.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":"2011-08-19T16:03:32.000Z","updated_at":"2021-02-27T14:51:53.000Z","dependencies_parsed_at":"2023-02-20T05:15:31.883Z","dependency_job_id":null,"html_url":"https://github.com/johnantoni/naked_url_for_s3","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnantoni%2Fnaked_url_for_s3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnantoni%2Fnaked_url_for_s3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnantoni%2Fnaked_url_for_s3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnantoni%2Fnaked_url_for_s3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johnantoni","download_url":"https://codeload.github.com/johnantoni/naked_url_for_s3/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246351016,"owners_count":20763232,"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":[],"created_at":"2024-12-12T03:15:54.400Z","updated_at":"2025-03-30T17:17:52.341Z","avatar_url":"https://github.com/johnantoni.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Naked URL redirect for Amazon S3\n\n### The Problem\n\nYou host a static site on S3, runs perfectly on your www.mysite.com domain but there's \nno way to do redirect mysite.com -\u003e www.mysite.com on your DNS without setting up a specific \nsite, creating a redirect etc. annoying.\n\n### (A) Solution\n\nInspired by http://wwwizer.com/ here's a dead simple naked url redirector. \nHow this works is you place it on your server (nginx config supplied) to respond to any direct \nip requests. In your DNS records create an A Record for your site (sans www.) e.g.:\n\n    domain name: mysite.com\n\n    Host:   Value:\n    @       191.321.321.321 (your ip address)\n\n\nAnd there you go, your server will receive mysite.com, add the www. to the start and redirect it\nalong preserving any request parameters.\n\nNot perfect but a minimal fix for something un-supported.\n\n\n### File Contents\n\n    /nginx\n      ...config for nginx\n\n    /public_html\n      ...php redirect that takes the HOST \u0026 REQUEST URL (minus www.) adds the www. and redirects them along\n      ...perfect for amazon s3 hosted sites that don't support naked domain redirection\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnantoni%2Fnaked_url_for_s3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnantoni%2Fnaked_url_for_s3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnantoni%2Fnaked_url_for_s3/lists"}