0

I have Linux webhosting on Godaddy. I tried installing Magento CE 1.8 on subdomain for more than a week and I still cannot get it to work.

Before you say this question is duplicit, I have tried everything I found on Magento Wiki, Forums, Google and Godaddy forum and support and I still cannot get it to work.

For php5.ini I take Magento php.ini.sample, .htaccess is from Magento too.

Using Options -MultiViews in .htaccess usually doesn't do anything. Settings cgi.fix_pathinfo = 1 in php5.ini creates cyclic redirect. I have tried playing with RewriteBase in .htaccess and that didnt help either.

I read that Magento doesnt run on fcgi, so I use in my .htaccess, doesnt help either:

Options +ExecCGI
addhandler x-httpd-php5-cgi .php

I always end up with "No file input specified" or cyclic redirect or server error.

Only lines in error log that I see are added:

[Thu Oct 31 01:23:08 2013] [11988011] [negotiation:error] [client 5.178.58.85:65433] AH00687: Negotiation: discovered file(s) matching request: "path" (None could be negotiated).

But I dont know what that does mean or how to fix that.

So is there anything else I can try or am I missing something? I know Magento on Godaddy shared hosting isnt a good idea, but I need to get there my development running and production will run on my clients Dedicated server.

Tomáš Chylý
  • 342
  • 1
  • 8
  • 21

3 Answers3

2

Add this to your .htaccess file and forgot those other fixes....

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

Russia Must Remove Putin
  • 374,368
  • 89
  • 403
  • 331
0

So I managed to solve it after few weeks of trying different solutions on net and trying to get support to help me.

Nothing helped solve it so I tried myself and found out that the problem is "index.php" in url. So I have created simple php function which is run in at the beginning of index.php file. This function removes "index.php/" from url and redirects to this new url.

Also to remove "index.php" from form actions and other places where the url might show up, it is good to create your own router module or modify Magentos router.

Now it all works.

PS: I have also kept other fixes in place:

In .htaccess:

Options +ExecCGI
AddHandler x-httpd-php5-cgi .php
AddHandler x-httpd-php5-cgi .php5

Options -MultiViews

RewriteBase /

And in php5.ini

cgi.fix_pathinfo = 1

EDIT

What I wrote does work, but is not good solution, redirect in index.php loses all POST data ofcourse. And looking at Magento and changing router takes too much work, so in the end I managed to create working rule in .htaccess for admin. Just put it as last rewrite rule in your .htaccess:

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

EDIT

Forgot to write here, that I have changed the rewrite to this:

RewriteRule ^index.php/(.*) /$1 [L]
Tomáš Chylý
  • 342
  • 1
  • 8
  • 21
0

If magento lies in a subdirectory then use:

RewriteRule ^index.php/admin(.*) {RewriteBase}/admin$1 [L]
Jawa
  • 2,336
  • 6
  • 34
  • 39