Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
.htaccess not working
  • I think my .htaccess is not working. Just want to ask about .routing in fuelphp. Currently, I'm uploading my website into the real server. When I upload it. Home page is only okay (mydomain.com), the rest of the pages are not working (mydomain.com/page1). I try to change the .htaccess and remove the comment of AllowOverride All and RewriteBase / but still not working.

    This is the directory of my website in the server.

    <!--server directory-->
    ---var/
    ------www/
    ---------html/
    ------------fuel/
    ------------public/
    ------------(other files)

    And this is my htaccess. Check it here. http://bin.fuelphp.com/snippet/view/LH


  • From the look of it you have installed Fuel inside your document root (which I assume is /var/www/html), instead of using virtualhosts for which Fuel was designed.

    In that case, your public folder is redundant, you can move everything in it one folder up to /var/www/html/fuel, end remove the now empty public folder.

    You then use the standard htaccess file supplied by Fuel without any modifications (so don't start playing with RewriteBase!).
  • Thanks Mr. Uru,

    I did it but still the same. This is now the directory of my server.

    <!--server directory-->
    ---var/
    ------www/
    ---------html/
    ------------fuel/
    ------------(files from the public folder)
    ------------(other files)

    I already change my index.php to this.

    realpath(__DIR__.'/fuel/app/').DIRECTORY_SEPARATOR);
    realpath(__DIR__.'/fuel/packages/').DIRECTORY_SEPARATOR);
    realpath(__DIR__.'/fuel/core/').DIRECTORY_SEPARATOR);

    Also on my .htaccess I didn't change anything.

    But this one works. domain.com/index.php/page1

    But it's all broken because of the path. Also I don't want to see the index.php
  • So what happens if you request /fuel/page1 ? What page do you get?

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion