-3

I have implemented a new .htaccess file at http://www.ssdpsjal.tk My code is -

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

I use CodeIgniter. You can visit the website to see the error.

Moreover I have tried this .htacccess on my local server and it isn't showing any such errors there (I think)

My Document Structure is as follows

--- ssdpsjal.tk                //given by host. Non-writable
  --n                          //the folder where website is stored
  --web_based_editor           //something my website uses
  --.htaccess file             //Htaccess file that I told about
  --Some other stuff not relevent to the question

EDIT

I have changed the code many times and after some changes I found the error to be occurring at RewriteRule ^(.*)$ n/index.php/$1 [L]

NOTE

The index at RewriteRule ^$ /index [L] is not Index.php It is actually a function(method) of my codeigniter controller

Actual URL without .htaccess is http://www.ssdpsjal.tk/n/index.php/s/index

Note the index on the last of sentence, it is that one!

halfer
  • 19,824
  • 17
  • 99
  • 186
Webmaster
  • 69
  • 1
  • 7

3 Answers3

0
<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /

  RewriteRule ^administrator /sadmin1 [R=301,L]

  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>

or just change this line:

RewriteRule ^(.*)$ n/index.php/$1 [L]

into:

RewriteRule ^$ n/index.php [L]
Piotr Pasich
  • 2,639
  • 2
  • 12
  • 14
0

I'm not sure of your configuration but are you sure mod_rewrite exists?

Perhaps:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*)  http://www.ssdpsjal.tk/$1 [R=301,L]
RewriteRule ^$ n/index.php [L]
Redirect /administrator /sadmin1
</IfModule>
Brian Ramsey
  • 850
  • 7
  • 21
0

Found the answer to my own question.

The .htaccess file is perfectly correct. The problem was with the webhost. They were updating their services without any warning (Notice came After 5-6 hours) due to which many services were shut down.

Well, i changed my Webhost to a new one which is way better. ( 000WebHost )

Webmaster
  • 69
  • 1
  • 7