(CLOSED) - App is not working when placed in root folder |
[eluser]gryzzly[/eluser]
Hello, I have a strange problem that i do not arrive to debug. Let me show you : [links edited] A] http://store.domain.tld/store/CodeIgniter B] http://essai.domain.tld Both A and B represent the same website, they are on the same distant host. The only differences are 1) subdomains : Code: store.domain.tld points to /www 2) $config['base_url'] Code: if($_SERVER['HTTP_HOST']=='store.domain.tld'){ The A] website functions correctly. All urls load the right page : Code: http://store.domain.tld/store/CodeIgniter/ => points to the home The B] website does NOT function. The only url that load the right page is the home. Code: http://essai.domain.tld/ => points to the home : OK Locally, the website functions perfectly, both from subfolders or from root folder : - http://localhost/store/CodeIgniter/ - http://store.dev/ (that points on /store/CodeIgniter ) What can be the thing ? I'm completly lost and do not know where to search. Thank's for reading, and for future answers ! Emmanuel.
[eluser]TheFuzzy0ne[/eluser]
It could be your htaccess file, or your URI protocol. I'd suggest trying either QUERY_STRING or REQUEST_URI as your URI protocol in the config.php.
[eluser]gryzzly[/eluser]
Ok, it was a .htaccess problem. I missed the "?" char in the rewrite rule : <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?/$1 [L] </IfModule> Thanks for help.
[eluser]TheFuzzy0ne[/eluser]
That's one way to do it, although I suspect that changing the URI protocol might have also done the same thing. If you do try removing the ? and changing the URI protocol, I'd be interested to know if it did work. I'm wondering if the two solutions are related. |
Welcome Guest, Not a member yet? Register Sign In |