Codeigniter从url中删除目录 [英] Codeigniter Remove directory from url
问题描述
我有以下域名: -
http://educonnects.com/jCat/ profile / recruiter_profile
我使用的是codeigniter框架。
我想要的域名可以是: -
http://educonnects.com/profile/recruiter_profile
Jcat是已安装codeigniter的项目名称。
$ b $在您的文件夹中添加.htaccess文件
/ p>您在application / config / route.php中设置默认路由控制器名称
< IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /educonnects.com
RewriteCond%{REQUEST_FILENAME}!-f
RewriteCond%{REQUEST_FILENAME}!-d
RewriteRule ^(。*)$ index.php / $ 1 [L]
< / IfModule>
< IfModule!mod_rewrite.c>
ErrorDocument 404 /index.php
< / IfModule>
(OR)
在apache httpd.conf文件中进行subversion。
你会发现如何设置subversion
I have a following domain name :- http://educonnects.com/jCat/profile/recruiter_profile
I am using codeigniter framework. And i want my domain name could be :-
http://educonnects.com/profile/recruiter_profile
Jcat is the project name where codeigniter has been installed.
Please help, i am new in codeigniter.
Add .htaccess file in your folder
You set default route controller name in application/config/route.php
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /educonnects.com
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
ErrorDocument 404 /index.php
</IfModule>
(OR)
You can set subversion in apache httpd.conf file. You will find out how to set subversion
这篇关于Codeigniter从url中删除目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!