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 4 of 4

Thread: .htaccess help

  1. #1
    New Coder
    Join Date
    Jan 2013
    Posts
    74
    Thanks
    19
    Thanked 1 Time in 1 Post

    .htaccess help

    I have a site that is set-up without stripping out the file extension of .php, so if someone wants to go to a page called rsvp.php, they can't just type into the browser www.somesite.com/rsvp

    The site is pretty large and I think if I did set up an .htaccess file to strip out the .php, I'd have to change out all the forms which direct to their parent files with the .php appended in the form action field.

    So the work around was creating a folder called promotion and then inside placing an index.php file to redirect to the rsvp.php file. That works great, unfortunately the customer put out fliers that shows the link in all capital letters. So some people type in www.somesite.com/rsvp and others type in www.somesite.com/RSVP. When they do it in uppercase, it doesn't go to the folder and says "page not found". And of course I can't create a separate folder with uppercase because then it'll replace the lowercase one.

    Anyone know what I can do to resolve this?

  • #2
    New Coder seanmarkham's Avatar
    Join Date
    Dec 2011
    Location
    Lincolnshire, England
    Posts
    50
    Thanks
    11
    Thanked 0 Times in 0 Posts
    Will a 301 redirect from the RSVP to rsvp not do the trick?

    Just place the below code in your .htaccess file

    Redirect 301 /RSVP http://www.somesite.com/rsvp
    When you know what you're doing it's called Engineering, when you don't know, it's called Research and Development

  • #3
    New Coder
    Join Date
    Jan 2013
    Posts
    74
    Thanks
    19
    Thanked 1 Time in 1 Post
    Quote Originally Posted by seanmarkham View Post
    Will a 301 redirect from the RSVP to rsvp not do the trick?

    Just place the below code in your .htaccess file

    Redirect 301 /RSVP http://www.somesite.com/rsvp
    This works when someone types in www.somesite.com/RSVP, but not with www.somesite.com/rsvp

  • #4
    New Coder seanmarkham's Avatar
    Join Date
    Dec 2011
    Location
    Lincolnshire, England
    Posts
    50
    Thanks
    11
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by cgdtalent View Post
    This works when someone types in www.somesite.com/RSVP, but not with www.somesite.com/rsvp
    What if you did a redirect from rsvp to rsvp.php before, there wouldn,t be the need for the folder and index file you are currently redirecting to?

    So redirect any attempt to rsvp to rsvp.php and redirect any attempt to RSVP to rsvp.php also.

    Code:
    Redirect 301 /rsvp http://www.somesite.com/rsvp.php
    Redirect 301 /RSVP http://www.somesite.com/rsvp.php
    When you know what you're doing it's called Engineering, when you don't know, it's called Research and Development


  •  

    Posting Permissions

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