【发布时间】:2015-08-01 03:25:01
【问题描述】:
我在删除 url 中的 public_html slug 时遇到问题
看起来像这样
http://shirodailynews.esy.es/public_html/about
但我想成为这样的人
http://shirodailynews.esy.es/about
我当前在 public_html 中的 .htaccess
RewriteEngine on
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L,QSA]
我的结构文件是这样的:
system
application
public_html
css
js
img
我也这样配置了系统和应用路径
$system_path = '../system';
$application_folder = '../application';
当我访问主网址时,它没有显示 public_html
http://shirodailynews.esy.es/
但是当我访问另一个链接时,它会使用 public_html slug 重定向它。
http://shirodailynews.esy.es/public_html/about
如何删除 url 中的 public_html slug?提前致谢!
【问题讨论】:
标签: apache codeigniter routing