Welcome our webmaster and SEO forum
Please enjoy the forum, contribute what you can, and wind up the Moderators!
Results 1 to 4 of 4

Thread: Redirect from upper case to lower case URL's on a Windows server

  1. #1
    Alliance's Avatar
    Alliance is offline Junior Member
    Join Date
    Feb 2008
    Posts
    20

    Default Redirect from upper case to lower case URL's on a Windows server

    Is this possible? So if someone entered www.mysite.com/PAGE.html they would actually get taken to www.mysite.com/page.html

    Cheers

  2. #2
    Join Date
    Jul 2008
    Location
    Lodnon, England
    Posts
    79

    Default

    what is a windows server? IIS? Apache under windows?

    how to use mod_rewrite to lower-case the destination? has a similar predicament on apache...

    anyway, its not that easy, it seems...

    Personally, i'd do something like:
    RewriteRule ^([A-Z]+).html$ redirect.php?page=$1 [L]

    if you have filenames like PAGE_TWO or PAGE-TWO, then simply add the chars like [A-Z_-]

    and then have redirect.php can be like so:
    PHP Code:
    <?PHP

    header
    ("Location: " strtolower($_GET['page']));

    ?>
    if it's an IIS server, google on how you setup rewrites on that, but the regex is going to be similar

  3. #3
    Prasad Cheruvannur is offline Junior Member
    Join Date
    Dec 2008
    Posts
    1

    Smile

    <?PHP

    header("Location: " . strtolower($_GET['page']));

    ?>


    I do not think the above will work. Basically it makes an endless loop of redirection. Even-if $_GET is having all lowercase this code will redirect again to lowercase.

    But if you can add a if else to check the $_GET and do the redircect only if URL contains Uppercase (and in other case do nothing)on it this code will work

    Regards
    Prasad
    Last edited by Prasad Cheruvannur; 12-05-2008 at 08:02 AM.

  4. #4
    Join Date
    Jul 2008
    Location
    Lodnon, England
    Posts
    79

Thread Information

Users Browsing this Thread

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

Bookmarks

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
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124