Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder trib4lmaniac's Avatar
    Join Date
    Feb 2004
    Location
    Cornwall, UK
    Posts
    535
    Thanks
    0
    Thanked 0 Times in 0 Posts

    mod_rewrite -> file

    How do you set up mod_rewrite (on apache2) to append .php to a url if the file exists? I've tried
    Code:
        RewriteEngine On
        RewriteCond %{REQUEST_URI}.php -f
        RewriteRule ^(.*)$ $0.php
    But that doesn't work

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Posts
    905
    Thanks
    23
    Thanked 5 Times in 5 Posts
    Trib..
    take a look at THIS link.. not only is it about mod rewrite but it also has lots of links to other references within the post about mod rewrite.

    Sir P

  • #3
    Regular Coder trib4lmaniac's Avatar
    Join Date
    Feb 2004
    Location
    Cornwall, UK
    Posts
    535
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks, but I can't see anything relating to what I want. TBH, I don't see why my previous method doesn't work. It should (or am I missing something.)


  •  

    Posting Permissions

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