The Lodge is members-only design/dev videos and Office Hours.

Next Office Hours Session: "Implementing an SVG Icon System" Nov 30 - 6:00 PM Eastern

Infinite Loop on simple rewrite

  • # April 2, 2013 at 2:02 pm

    I have the following:

    RewriteRule ^location/([^/.]+)/?$ location?p=$1 [L]

    I got an endless loop in the error log (500 error in the browser).

    So I want to rewrite to

    I assume it’s because I’m redirecting to a page named the same as the url. Is there a good way to accomplish this without renaming the actual page?

    # April 2, 2013 at 2:17 pm

    This reply has been reported for inappropriate content.

    Are you trying to redirect a page to another page or are you trying to change the way the page is identified?

    What’s the site?

    # April 2, 2013 at 2:34 pm

    This reply has been reported for inappropriate content.

    I’m just trying to use a simple permalink scheme.

    is rewritten to

    My guess is that the infinite loop is taking place because the url is the same name as the actual php page, and continues to get redirected over and over.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed