2017-05-31 87 views

回答

-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

我已经完成了所有一样的东西。 在我的应用程序文件夹,我有根 1.index.php 2.Pro2.php Pro2的 1.Pro1 2.Pro2 和2索引文件只运行时类型Pro2.php在网址我想reomove .php。 Pro1是好的 –

+0

感谢如何配置文件 –

+0

只是让它空的基地址..它仍然会工作 –

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

相关问题