3

I have a CodeIgniter application which is successfully deployed on localhost and justhost without any errors. Now, I need to migrate to DreamHost and place it in the subdirectory: http://mywebsite.com/code_igniter_root/ Now the applications give me the "No input file specified" error with this old htaccess file :

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

When I change to this by adding the question mark after the RewriteRule index.php, it works:

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

However, there is a problem that I cannot receive the post data anymore via $_POST and $this->input->post();

What is the solution for this problem? DreamHost is really annoying...

  • 2
    maybe some configuration in the [query string](http://ellislab.com/codeigniter/user-guide/general/urls.html) – manix Nov 28 '12 at 03:06
  • 1
    If the url is going to be along the lines of `http://mywebsite.com/code_igniter_root/` make sure you have set the base url in the config/config.php file to `http://mywebsite.com/code_igniter_root/` . You may also need to alter your htaccess again to account for the subfolder. Something like `^(.*)$ code_igniter_root/index.php?/$1 [L,QSA]`. – Jeemusu Nov 28 '12 at 04:15
  • Thank you, it is working now ! So non-www and www are different? How can I force the user into 1 version of non-www? – Long Nguyễn Đức Hoàng Nov 28 '12 at 04:46
  • if you go to the www domain, it still doesn't work? – Jeemusu Nov 28 '12 at 05:51
  • I don't think this should have been closed. I think the title was poorly worded, and @Jeemusu should have posted an answer rather than comment. But it's a valid problem which I am experiencing as well. – Ryan Ore Sep 20 '13 at 13:56
  • I just came across this in case it helps anyone. It seems the question mark after the php is critical in the Dreamhost environment. http://ellislab.com/forums/viewthread/55620/ – Ryan Ore Sep 20 '13 at 15:26

0 Answers0