dcsimg
www.webdeveloper.com
Results 1 to 3 of 3

Thread: .htaccess

  1. #1
    Join Date
    Aug 2011
    Location
    Worthing, West Sussex
    Posts
    96

    .htaccess

    Okay, so this script works great:

    HTML Code:
    Options +FollowSymlinks
    RewriteCond %{HTTP_HOST} ^tbplasteringltd.co.uk$ [NC]
    RewriteRule ^(.*)$ http://www.tbplasteringltd.co.uk/$1 [R=301,L]
    RewriteEngine on
    RewriteRule ^(.*)\/$ $1.php [NC]
    However, it would be even better if it would work without having to add the extra forward slash on a link: www.yourdomain.com/about/ rather than having it like this: www.yourdomain.com/about

    I've seen sites that use the forward slash but if you take it away, it will instantly forward to the one with the forward slash. It looks so much more professional. Anyone have any ideas?

  2. #2
    Join Date
    Apr 2012
    Posts
    22
    Did you try to remove it from the regular expression?
    RewriteRule ^(.*)$ $1.php [NC]

  3. #3
    Join Date
    Aug 2011
    Location
    Worthing, West Sussex
    Posts
    96
    Yup, tried that and get Internal Server Error (500).

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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



Recent Articles