.htaccess htaccess隐藏扩展不';不允许ExpressionEngine登录

.htaccess htaccess隐藏扩展不';不允许ExpressionEngine登录,.htaccess,redirect,expressionengine,.htaccess,Redirect,Expressionengine,差不多是这么说的,但是在我的.htaccess中使用这个 Options +FollowSymLinks -MultiViews # Turn mod_rewrite on RewriteEngine On RewriteBase / ## removes index.php # Add/Hide index.php from everything except admin RewriteCond $1 !\.(gif|jpe?g|pn

差不多是这么说的,但是在我的.htaccess中使用这个

    Options +FollowSymLinks -MultiViews

    # Turn mod_rewrite on
    RewriteEngine On
    RewriteBase /

    ## removes index.php
    # Add/Hide index.php from everything except admin
    RewriteCond $1 !\.(gif|jpe?g|png)$ [NC]
    RewriteCond $1 !admin$ [NC]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /index.php?$1 [L]

    ## hide .php extension
    # To externally redirect foo.php to foo
    RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.php [NC]
    RewriteRule ^ %1 [R,L,NC]

    ## To internally redirect /dir/foo to /dir/foo.php
    RewriteCond %{REQUEST_FILENAME}.php -f
    RewriteRule ^ %{REQUEST_URI}.php [L]
将允许我使用/admin作为url,但不允许我登录

如果我删除这行
RewriteCond$1!admin$[NC]
它在
/admin making it index.php/admin,而我看不到页面

你想实现什么?只是删除index.php?如果是这样,那么这个.htaccess可以工作:

RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /index.php/$1 [L] 重新启动发动机 重写cond%{REQUEST_FILENAME}-F 重写cond%{REQUEST_FILENAME}-D 重写规则^(.*)$/index.php/$1[L]
当然,您必须访问/admin.php,如果您愿意,也可以将它放在名为/admin的目录中。

您想要实现什么?只是删除index.php?如果是这样,那么这个.htaccess可以工作:

RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /index.php/$1 [L] 重新启动发动机 重写cond%{REQUEST_FILENAME}-F 重写cond%{REQUEST_FILENAME}-D 重写规则^(.*)$/index.php/$1[L] 当然,您必须访问/admin.php,如果您愿意,也可以将它放在名为/admin的目录中