Note that there are some explanatory texts on larger screens.

plurals
  1. POKo3 - URL Rewriting problem - Removing index.php
    primarykey
    data
    text
    <p>I'm developing a website using Kohana 3 (1rst time I use a framework). Locally, everything works perfectly. At the moment, I have a default template controller, a multi-language support and my 'index.php' is correctly removed. So before going further, I tested if it worked on my server and I got an endless loop.</p> <p>I followed the tutorial from the unofficial wiki for the multi-language implementation: <a href="http://www.kerkness.ca/wiki/doku.php?id=example_of_a_multi-language_website" rel="nofollow noreferrer">http://www.kerkness.ca/wiki/doku.php?id=example_of_a_multi-language_website</a></p> <p>A redirection to the default language occurs if the language is not specified in the uri so I figured the problem might have come from there even though it worked locally, so I removed it to see what happens without the redirection. Now, I can see my home page, but whatever the uri is in the web browser, the home page will always be called. I inserted the following line in my home view to check what the uri was: request::instance()->uri() and effectively, the uri is always: /en/home/</p> <p>I put the index.php back (in the bootstrap) and everything worked fine again, even with the redirection to the default language.</p> <p>My first guess was that the uri isn't rewritten correctly, so I tried to change the .htaccess but no success...</p> <p>Here's my .htaccess:</p> <pre><code># Turn on URL rewriting RewriteEngine On # Installation directory RewriteBase /dev/ # Protect hidden files from being viewed &lt;Files .*&gt; Order Deny,Allow Deny From All &lt;/Files&gt; # Protect application and system files from being viewed RewriteRule ^(application|modules|system)/ - [F,L] # Allow any files or directories that exist to be displayed directly RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d # Rewrite all other URLs to index.php/URL RewriteRule .* index.php/$0 [PT] </code></pre> <p>(btw I also tried the other RewriteRule in the unofficial wiki, doesn't work either)</p> <p>Additional info: Host: WebHostingPad Apache: v2.2.11 PHP: 5.2.9</p> <p>Rewrite_Module is activated</p> <p>Thank you, I would really appreciate your help because I've been trying to fix this for days now and it's really starting to annoy me ;)</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload