SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict
    Join Date
    Sep 2006
    Posts
    238
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    mod_rewrite clashing

    Hello

    I currently have a mod_rewrite for a profile system where users can go onto other users profiles e.g

    example.com/john
    exampe.com/sarah

    However this would cause problems if a user attempted to go on a profile that had an actual directory on my server e.g

    example.com/images
    example.com/files

    My question is how can I add an exemption to these directories so they do not work with the mod_rewrite.

  2. #2
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,672
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by Jaynesh View Post
    Hello

    I currently have a mod_rewrite for a profile system where users can go onto other users profiles e.g

    example.com/john
    exampe.com/sarah

    However this would cause problems if a user attempted to go on a profile that had an actual directory on my server e.g

    example.com/images
    example.com/files

    My question is how can I add an exemption to these directories so they do not work with the mod_rewrite.
    Code:
    #insert before your RewriteRule
    RewriteCond %{REQUEST_URI} !(images|files)
    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator


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
  •