Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
2.2k views
in Technique[技术] by (71.8m points)

apache - CodeIgniter .htaccess - 500 Internal Server Error/ index.php remove

I have a website like this (sub-domain)

rabbani.websolocom.xyz

And I have the .htaccess code like this (I used Codeigniter) :

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

But when I try to access my website it goes error (500 Internal Server Error). What should i do with my .htaccess file? Or any another file that wrong in my directory?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Use this

.htaccess(Outside application folder)

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

This is Codeigniter recommended .htaccess


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...