如何在codeigniter中的多个项目中编辑.htaccess
文件和index.php
文件以在其他项目中创建基本网址?如何在codeigniter中的多个项目中编辑htaccess文件和index.php文件
0
A
回答
-1
尝试读取这个文件Managing your Applications
那就试试这个的.htaccess代码:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /mywebsite
# Removes access to the system folder by users.
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteRule ^(.*)$ pro1.php?/$1 [L]
RewriteRule ^(.*)$ pro2.php?/$1 [L]
# Prevents user access to the application folder
RewriteCond %{REQUEST_URI} ^application.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteRule ^(.*)$ pro1.php?/$1 [L]
RewriteRule ^(.*)$ pro2.php?/$1 [L]
# Checks to see if the user is attempting to access a valid file,
# such as an image or css document, if this isn't true it sends the
# request to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
RewriteRule ^(.*)$ pro1.php?/$1 [L]
RewriteRule ^(.*)$ pro2.php?/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
ErrorDocument 404 /index.php
</IfModule>
0
写各个端口的htaccess
端口2 [
的index.php //($ application_folder =“应用/ port2';)//设置此路径 .htaccess // port2
]
port3 [
的index.php //($ application_folder = '应用/ PORT3')//设置该路径 htaccess的// PORT3
]
application [
port1[
config[
config.php
-> $config['index_page'] = ''; //set blank
]
]
port2[
config[
config.php
-> $config['index_page'] = ''; //set blank
]
]
port3[
config[
config.php
-> $config['index_page'] = ''; //set blank
]
]
]
//root directory is port 1
index.php // ($application_folder = 'application/port1';)//set this path
的.htaccess // PORT1
相关问题
- 1. 编辑多个.htaccess文件
- 2. 如何在CodeIgniter中启用index.php文件?
- 3. 编辑.htaccess文件,多个域
- 4. 在IntelliJ中编辑非项目文件
- 5. 如何添加两个index.php文件在.htaccess文件笨
- 6. codeigniter htaccess子文件中的文件
- 7. codeigniter中的htaccess文件
- 8. 编辑和更新CodeIgniter中的项目
- 9. 编辑.htaccess文件(WordPress的)
- 10. 无法在JDeveloper中的.jws项目中编辑任何文件
- 11. 问题与的.htaccess和index.php文件
- 12. 如何在maven项目中编译和生成单个文件
- 13. .htaccess多个文件夹和根目录
- 14. 通过htaccess的删除ID和index.php文件在子目录
- 15. 如何在apache/.htaccess/mod_rewrite中隐藏yii的index.php文件?
- 16. codeigniter中的htaccess文件在哪里?
- 17. 如何从codeigniter中的URL中删除index.php文件?
- 18. .htaccess重定向index.php文件
- 19. 编辑的.htaccess重定向从文件夹中的HTML文件
- 20. 编辑多个HTML文件
- 21. 如何在一个子文件夹中设置CodeIgniter htaccess?
- 22. 如何在Python中编辑chm文件中的html文件
- 23. 如何在Flex列表组件中编辑项目编辑器?
- 24. .htaccess文件问题/无法编辑.htaccess
- 25. 以编程方式在Visual Studio项目文件中添加和编辑目标
- 26. 在codeigniter的htaccess中重命名index.php
- 27. 没有index.php的Codeigniter在配置文件中改变,.htaccess不能正常工作
- 28. 在plist文件中编辑多个字典中的一个?
- 29. swagger-node:使用swagger“项目编辑与”$ ref(多个文件)
- 30. 如何在编辑XML文件时运行我的项目?
我已经完成了所有一样的东西。 在我的应用程序文件夹,我有根 1.index.php 2.Pro2.php Pro2的 1.Pro1 2.Pro2 和2索引文件只运行时类型Pro2.php在网址我想reomove .php。 Pro1是好的 –
感谢如何配置文件 –
只是让它空的基地址..它仍然会工作 –