想要为htaccess生成重定向规则

I am having trouble to generate redirection rule I tried so many possible ways but those are not working. Here are the details:

1) Current link: https://app.abcd.com (Showing in url)

2) Redirect to: https://app.abcd.com/index.php/login

3) Should be renamed as : https://app.abcd.com/login

I have tried :

RewriteEngine on
RewriteRule (.*) http://https://app.abcd.com/index.php/login/$1 [R=301,L] 

Didn't work!

Any help!

You can use this :

RewriteEngine on

RewriteRule ^$ /index.php/login [L,R]

This will redirect your homepage / to /index.php/login

You can also accomplish this using RedirectMatch

RedirectMatch 301 ^/$ /index.php/login/

Try it.

Options +FollowSymlinks
Options -Indexes

<FilesMatch "\.(tpl|ini|log)">
 Order deny,allow
 Deny from all
</FilesMatch>
RewriteEngine on



RewriteBase /example/  



RewriteCond %{HTTP_HOST} ^example\.com$
RewriteRule ^(.*) index.php/$1 [R=301]


RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^?]*)/([^?]*) index.php?_cmd_=$1/$2  [L,QSA]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^?]*) index.php?_cmd_=$1  [L,QSA]

HTACCESS

RewriteEngine on
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA] 

Open config.php and do following replaces

$config['index_page'] = "index.php"

.htaccess for codeigniter:

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]

And in config.php:

change:

$config['index_page'] = "index.php";

to:

$config['index_page'] = "";

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
IndexIgnore *

Try to add this in your .htacces file:

Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?$1 [L,QSA]

RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s(.*)/index\.php [NC]
RewriteRule ^ %1 [R=301,L]