how to remove folder name from url in localhost using codeigniter ? Hello I am using codeigniter franework for my project. i am saving all my project data in "opt/lampp/htdocs/myprjectfolder" ok. now its working using url "localhost/myprjectfolder" Now i want to remove that foldername iemyprjectfolder from url like "localhost/" can it directly open my website pages(controller)(iemyprjectfolder) ? what to do with config.php or route.php file ?please give some time and solution Thanks
如果我们忽略用htdocs替换项目文件夹,那不是codeigniter配置,那么您最好的解决方案是使用虚拟主机
Put all your files out side the folder, directly in htdocs folder(NOT RECOMMENDED).
OR
You can convert localhost to virtual domain names
Ref:
http://drupal.org/node/1152594
http://www.learnbycode.com/content/how-assign-virtual-local-domain-name-your-localhost
http://complete-concrete-concise.com/web-tools/how-to-change-localhost-to-a-domain-name
download EasyPHP and set virtual domain, easy way
您可以在config/routes.php
文件中删除文件夹名称:
$route['folder/product/(:any)'] = "product/(:any)";
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.