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 2 of 2
  1. #1
    Regular Coder student101's Avatar
    Join Date
    Nov 2007
    Posts
    634
    Thanks
    80
    Thanked 15 Times in 15 Posts

    Question redirect to folder even without ending slash "/"

    Redirect to a folder even without ending slash "/"
    None of these seem to work:
    Code:
    RewriteEngine on
    Redirect non www to www.example.co.za
    RewriteCond %{HTTP_HOST} ^example\.co\.za$ [NC]
    RewriteRule ^(.*)$ http://www.example.co.za/php/ $1 [R=301,L]
     
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTP_HOST} ^example\.co\.za [NC]
    RewriteRule ^(.*)$ http://www.example.co.za/php/$1 [L,R=301]
    </IfModule>
    If I use example.co.za/php
    Results:
    Firefox: http://www.example.co.za/php/www/example/php
    IE8: http://example.co.za/php

    Forced to use http://example.co.za/php/ ending slash to get http://www.example.co.za/php/
    Last edited by student101; 07-26-2010 at 10:08 AM.
    Thanks for your support!
    Update MySQL with checkboxes | Tell A Friend | Delete MySQL with checkboxes

    Give thanks & resolve when done :thumbsup:

  • #2
    Regular Coder student101's Avatar
    Join Date
    Nov 2007
    Posts
    634
    Thanks
    80
    Thanked 15 Times in 15 Posts
    "Resolved"
    This will work in most cases - not mine.
    Thanks for your support!
    Update MySQL with checkboxes | Tell A Friend | Delete MySQL with checkboxes

    Give thanks & resolve when done :thumbsup:


  •  

    Posting Permissions

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