Results 1 to 4 of 4

Thread: Mod_Rewrite on one single php page

  1. #1
    Join Date
    Feb 2007
    Posts
    145
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Post Mod_Rewrite on one single php page

    Hi, I am wanting to know if it is poossible to Mod_Rewrite one single .php page, so an example that i want would be...

    Http://www.ryanfitton.co.uk/contact.php

    and I want it to be Mod_Rewrite to....

    http://www.ryanfitton.co.uk/contact/


    Is this possible for just the contact.php page? because I don't want all of my pages to be like this.


    Many thank, Ryan.

  2. #2
    Join Date
    Jul 2008
    Posts
    199
    Thanks
    6
    Thanked 58 Times in 57 Posts

    Default

    This should do it for you:
    Code:
    RewriteEngine on
    RewriteRule ^contact/?$ contact.php

  3. #3
    Join Date
    Feb 2007
    Posts
    145
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Default

    this code does not seem to be working for me i have put it at the top of my .htaccsess file which is in the root of my directory, however when i try and accsess http://www.ryanfitton.co.uk/contact.php it stay as it is and when i access http://www.ryanfitton.co.uk/contact/ it shows a 404 error

  4. #4
    Join Date
    Jul 2008
    Posts
    199
    Thanks
    6
    Thanked 58 Times in 57 Posts

    Default

    It is a server configuration issue, as the code works properly. Contact your web host (1&1) and see what's up.

Bookmarks

Posting Permissions

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