Results 1 to 6 of 6
  1. #1
    Junior Member
    Join Date
    Feb 2008
    Posts
    6

    Smile .htaccess problems --> solved!

    Hi guys,

    I have a problem with my .htaccess, and I don't know how to solve it

    In my .htaccess, I have this (I just propose a nice extension for my website):
    RewriteEngine On
    RewriteBase /fanatic/
    RewriteRule ^([A-Za-z0-9 ]+)\.php5$ $1.fny?%{QUERY_STRING} [L]
    RewriteRule ^([A-Za-z0-9]+)\.fny$ $1.php?%{QUERY_STRING} [L]

    In my httpd.conf:
    <VirtualHost *:80>
    ServerName fanaticparis.com
    ServerAlias www.fanaticparis.com
    DocumentRoot /var/www/html/fanatic
    </VirtualHost>

    So here, it works well:
    http://fny.com.whsites.net/fanatic/index.fny

    But with my other domain (it points to the above "fanatic" folder), it does not work :
    http://fanaticparis.com/index.fny

    It seems that my .htaccess is not used with http://fanaticparis.com (for instance, if I write dummy stuff in the .htaccess, http://fanaticparis.com keeps working, but not http://fny.com.whsites.net/fanatic/index.fny with a "Internal Server Error").

    So I am lost
    Thank you very much for your help!
    Bye,
    Thomas
    Last edited by Tom951; 02-18-2008 at 12:54 PM.

  2. #2
    Moderator wildjokerdesign's Avatar
    Join Date
    Jun 2003
    Location
    Kansas City Mo
    Posts
    5,721

    Default

    Since document root for fanaticparis.com is /var/www/html/fanatic I don't believe that your RewriteBase should be /fanatic/. It should simply be / if anything.
    Shawn
    Please remember your charity of choice: http://www.redcross.org

    Handy Links: wildjokerdesign.net | Plain Text Editors: EditPlus | Crimson

  3. #3
    Senior Member jalal's Avatar
    Join Date
    May 2003
    Location
    Germany
    Posts
    1,377

    Default

    You may need to add:

    AllowOverrides All

    in your Virtual Host section.

    If that works, then you could change it to:

    AllowOverrides FileInfo

    HTH

  4. #4
    Junior Member
    Join Date
    Feb 2008
    Posts
    6

    Default

    Thanks a lot for your help!
    Nevertheless it does not work

    It's weird, it seems that the modifications I did in /etc/httpd/conf/httpd.conf are not taken into account (is there any lag to take the modifications into account?) !

    With this conf:
    <VirtualHost *:80>
    ServerName fanaticparis.com
    ServerAlias www.fanaticparis.com
    DocumentRoot /var/www/html/
    AllowOverrides FileInfo
    </VirtualHost>

    ... instead of DocumentRoot /var/www/html/fanatic, it keeps working and displaying the index.php in /var/www/html/fanatic

    do you have any idea? maybe i did not modify the right httpd.conf?

    thanks a lot for your help, i'm a bit lost ...
    Bye,
    Thomas

  5. #5
    Senior Member jalal's Avatar
    Join Date
    May 2003
    Location
    Germany
    Posts
    1,377

    Default

    If you modify /etc/httpd/conf/httpd.conf, you have to restart the server for it to have any effect. Changes to .htaccess files are immediate.

    Restart with:
    /etc/rc.d/init.d/httpd restart

    HTH

  6. #6
    Junior Member
    Join Date
    Feb 2008
    Posts
    6

    Default

    Ok... shame on me Now it WORKS !!!!

    So in fact it works thanks to my first modification (I read it from http://forums.westhost.com/showthread.php?t=8154 ), about the DocumentRoot with the "true path":

    I had first:
    DocumentRoot /www/htdocs/fanatic

    And I modified it to:
    DocumentRoot /var/www/html/fanatic

    But I did not restart the server

    And then, wildjokerdesign, you're right, I have to set the RewriteBase to "/" instead of "/fanatic/".

    Thanks a lot, it was very helpful !!
    Bye
    Thomas

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •