• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Homepage shows up after clicking any link - routing problem?

#1
[eluser]Unknown[/eluser]
Hi,

My website (http://myjugaad.in/) is hosted on a shared hosting account (hostgater). Till last week it was working perfectly but now suddenly there is a very funny error showing up. If you go to http://myjugaad.in/ and click any link, it just reloads the homepage. For example, http://myjugaad.in/about shows homepage when it should show the about page. However, if you insert index.php in he URL, the right page is shown (http://myjugaad.in/index.php/about). Earlier every URL was accessible without index.php

Now how can suddenly this thing could change? I have checked .htaccess, folder permissions, script permissions, everything seems to be fine.

Please help.

-Paras

#2
[eluser]Pascal Kriete[/eluser]
If you didn't make any changes, it sounds like your host may have changed something.

I'm guessing the culprit is either htaccess or the uri_protocoll setting in your config.
A possible solution, since it works with a ?, is to just add that to your RewriteRule:
Code:
# if you had this:
RewriteRule ^(.*)$ index.php/$1 [L]

# turn it into this:
RewriteRule ^(.*)$ index.php?/$1 [L]

Let us know how that goes.

#3
[eluser]Unknown[/eluser]
Thanks a ton! It worked. Can you tell why adding a '?' worked? It is the problem with the way URL is passed to index.php?

#4
[eluser]Bramme[/eluser]
adding the ? is the same thing as index.php? Wink

#5
[eluser]phpoet[/eluser]
You can check to make sure that mod_rewrite is loaded by creating a <?php phpinfo() ?> page then looking in the apache2handler section under "Loaded Modules". If do not see mod_rewrite then that may be the problem.

Also, for what it's worth, this is the .htaccess file I usually use.

Code:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.