doutui7955 2014-11-30 16:15
浏览 75
已采纳

Laravel Migration问题从URL中删除index.php

I am just developed a laravel CRUD Application and migrated to live server.

Currently am accessing the site like http://example.com/index.php/manage-forms/ and its working fine.

how can i remove the index.php from URL.?

i dont have .htaccess in root, am not familiar with .htaccess issues. can u please share me the .htaccess file for viewing my site like http://example.com/manage-forms/

Thanks

  • 写回答

1条回答 默认 最新

  • douying2243 2014-11-30 16:21
    关注

    The .htaccess file is included in the laravel project on its own but if still you missed it in the process of transferring files from local to server add the following code in your .htaccess file under public folder

    <IfModule mod_rewrite.c>
    <IfModule mod_negotiation.c>
        Options -MultiViews
    </IfModule>
    
    RewriteEngine On
    
    # Redirect Trailing Slashes...
    RewriteRule ^(.*)/$ /$1 [L,R=301]
    
    # Handle Front Controller...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
    </IfModule>
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料