need help with mod_rewrite on leopard server

Discussion in 'Web Design and Development' started by twoodcc, Mar 22, 2009.

  1. twoodcc macrumors P6

    twoodcc

    Joined:
    Feb 3, 2005
    Location:
    Right side of wrong
    #1
    so i have a server running 10.5 server, and cannot get mod_rewrite to work. it says that it's installed and everything, according to phpinfo()

    but it doesn't work. i have turned it on with httpd.conf and have set the Override to all

    any ideas on how to make this work?

    thanks in advance
     
  2. Kaliemon macrumors member

    Joined:
    Apr 30, 2006
    #2
    Did you place your mod_rewrite rules in a .htaccess file in your site's folder and remember to turn on the rewrite engine?

    Heres an example that rewrites requests from *.htm to *.php

    Code:
    Options +FollowSymlinks
    RewriteEngine on
    RewriteRule ^(.*)\.htm$ $1.php [NC]
    Don't know your experience with rewrite rules, but if you have already done this, posting your rewrite rules will help with diagnosing problems.

    Also try test the rule I posted above by creating a php file and requesting it with .htm and see if you get the php version.
     
  3. twoodcc thread starter macrumors P6

    twoodcc

    Joined:
    Feb 3, 2005
    Location:
    Right side of wrong
    #3
    thanks for the reply. it turns out that i got it to work! i just had to adjust my httpd.conf file and also change the .htaccess file
     

Share This Page