.htaccess文件在Codeigniter应用程序中未正确重定向
我有一个应用程序使用MAMP在本地机器上运行,但无法重定向到live server上的某个页面。我已经将范围缩小到.htaccess文件,但似乎无法获得确切的配置。当我在基于Codeigniter的应用程序上注册一个用户时,就会发生这种情况,它应该重定向到另一个页面,但不会 这就是我现在拥有的.htaccess文件在Codeigniter应用程序中未正确重定向,.htaccess,codeigniter,mamp,.htaccess,Codeigniter,Mamp,我有一个应用程序使用MAMP在本地机器上运行,但无法重定向到live server上的某个页面。我已经将范围缩小到.htaccess文件,但似乎无法获得确切的配置。当我在基于Codeigniter的应用程序上注册一个用户时,就会发生这种情况,它应该重定向到另一个页面,但不会 这就是我现在拥有的 RewriteEngine on RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://website.com/$1 [R,L] # Hide
RewriteEngine on
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://website.com/$1 [R,L]
# Hide all PHP files so none can be accessed by HTTP
RewriteRule (.*)\.php$ index.php?/$1
# If the file/dir is NOT real go to index
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [QSA,L]
试着这样使用
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example.com [NC]
RewriteRule ^(.*)$ https://www.example.com/$1 [L,R=301,NC]