{"action":"opened","issue":{"url":"https://api.github.com/repos/spbooks/phpmysql6/issues/17","repository_url":"https://api.github.com/repos/spbooks/phpmysql6","labels_url":"https://api.github.com/repos/spbooks/phpmysql6/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/spbooks/phpmysql6/issues/17/comments","events_url":"https://api.github.com/repos/spbooks/phpmysql6/issues/17/events","html_url":"https://github.com/spbooks/phpmysql6/issues/17","id":375687412,"node_id":"MDU6SXNzdWUzNzU2ODc0MTI=","number":17,"title":"URL Rewriting and Final Website","user":{"login":"jgitbuh","id":32238390,"node_id":"MDQ6VXNlcjMyMjM4Mzkw","avatar_url":"https://avatars1.githubusercontent.com/u/32238390?v=4","gravatar_id":"","url":"https://api.github.com/users/jgitbuh","html_url":"https://github.com/jgitbuh","followers_url":"https://api.github.com/users/jgitbuh/followers","following_url":"https://api.github.com/users/jgitbuh/following{/other_user}","gists_url":"https://api.github.com/users/jgitbuh/gists{/gist_id}","starred_url":"https://api.github.com/users/jgitbuh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgitbuh/subscriptions","organizations_url":"https://api.github.com/users/jgitbuh/orgs","repos_url":"https://api.github.com/users/jgitbuh/repos","events_url":"https://api.github.com/users/jgitbuh/events{/privacy}","received_events_url":"https://api.github.com/users/jgitbuh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-30T20:50:30Z","updated_at":"2018-10-30T20:50:30Z","closed_at":null,"author_association":"NONE","body":"![image](https://user-images.githubusercontent.com/32238390/47745715-43410900-dcbf-11e8-93ec-860a3cda59db.png)\r\n\r\nhi Tom, thank you. i made it using xampp with directory structure C:\\xampp\\htdocs\\ijdb6\\Project\\public\r\n\r\nif anyone wants to try using xampp, here's how:\r\n1. first and foremost you need to change your Apache server **root folder** from default one at **htdocs** (c:\\xampp\\htdocs) to **public** (c:\\xampp\\htdocs\\ijdb6\\Project\\public). i use this directory structure but should also work for any directory structure you choose\r\n\r\nchange file httpd.conf like this: \r\n![image](https://user-images.githubusercontent.com/32238390/47746510-302f3880-dcc1-11e8-85e0-ed1d77ea39f3.png)\r\nyou can search the file in c:\\xampp\\apache or you can hit Config button in Xampp control panel and choose httpd.conf file\r\n\r\ndont forget to stop and restart your apache server so the change will take effect. just hit stop and start button in Xampp control panel\r\n\r\n2. create .htaccess file and place it in root folder. our new root folder now is 'public'. the content like this:\r\n\r\nRewriteEngine on\r\nRewriteCond %{REQUEST_FILENAME} !-f\r\nRewriteCond %{REQUEST_FILENAME} !-d\r\nRewriteRule ^.*$ /index.php [NC,L,QSA]\r\n\r\nyou can create this file using IDE or using notepad. with notepad choose to 'save as' and 'save as type' All Files\r\n\r\n3. type localhost in your browser address bar, and, voilaa..\r\nif you like to have a feeling like you are accessing a real server, you can change localhost to mydevserver.com or any whimsical name you can come up to by edit file **hosts** located in C:\\Windows\\system32\\drivers\\etc\r\nyou need windows special permission to make the edit. try make the edit using windows provided account named administrator\r\n\r\nthats all.\r\n\r\nTom has introduced very good technique that we should put our front controller (index.php) and other necessary files in root folder but put those important files outside of this folder. by making these changes we can make our root folder 'public' to serve the internet while we put the important files out from this folder\r\n\r\nthe provided .htaccess file make sure that for every non-existent folder/path or file we query in browser's address bar will go to index.php. the next thing is obvious, we make the index.php to response to specific URI. in other words, any URI is acceptable to the controller as long as we provide their corresponding response\r\n"}}
{"actor":{"display_login":"jgitbuh"}}