Not signed in (Sign In)

SkillShare - A place to discuss Web Standards and Web Design topics

Categories

Vanilla 1.1.5a is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthoraconnor
    • CommentTimeJan 14th 2008
     permalink
    I have the following rewrite rules:

    RewriteRule ^([a-zA-Z0-9_-]+)\.php$ $1/ [R,NC]
    RewriteRule ^([a-zA-Z0-9_-]+)/$ $1\.php [NC,L]

    which seem to be resolving into an infinite loop. My question is why? Shouldn't the "L" flag in the second rule end the rule processing?

    Thanks in advance for the help.

    -adam
    • CommentAuthorPettyRider
    • CommentTimeJan 15th 2008
     permalink
    Your rules are essentially complete opposites.

    "file.php > file > file.php > file > file.php > file > ..."

    So, what exactly are you trying to achieve here?
    • CommentAuthorvarland
    • CommentTimeJan 16th 2008
     permalink
    He's trying to not show file extensions. If somebody requests "/index.php", the first rule redirects them to "/index/". Then, the second rule points "/index/" to "/index.php". The key is that the first rule actually redirects.
Add your comments
    Username Password
  • Format comments as (Help)