如何为自定义URL配置.htaccess

时间:2016-10-29 12:54:40

标签: php .htaccess

我需要知道如何设置.htaccess来制作自定义网址,如下所示:

“www.examplesite.com/main/sub/sub_sub”

我的.htaccess中有以下代码:

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /

    # Removes index.php from ExpressionEngine URLs
    RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
    RewriteCond %{REQUEST_URI} !http://localhost/routeB/.* [NC]
    RewriteRule (.*?)index\.php/*(.*) routeB/$1$2 [R=301,NE,L]

    # Directs all EE web requests through the site index file
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ routeB/index.php/$1 [L]
 </IfModule>

请帮帮我!

我正在制作一个框架

0 个答案:

没有答案