Results 1 to 4 of 4
  1. #1

    mod_rewrite question

    Hey, I have recently been working on a mod_rewrite solution to allow me to have cleaner url's.
    I am trying to keep it simple and as such have the following setup;

    Options +FollowSymLinks
    RewriteEngine on

    RewriteRule ([^-]*)$ index.php?page=$1

    The problem is it also redirects forums such as /includes/ etc. Is there a way to exclude certain folders from a mod_rewrite like the one i showed above?

    Thanks for any help.

  2. #2
    Join Date
    Jul 2003
    I think what you are after is RewriteBase, which restricts the rule to a particular sub-directory.

    Welcome to WHT
    In order to understand recursion, one must first understand recursion.
    If you feel like it, you can read my blog
    Signal > Noise

  3. #3
    ok thanks I'll check it out =)

  4. #4
    Join Date
    Jul 2001
    Glasgow, Scotland
    I suppose you want SEFU(Search-Engine Friendly URLs)...
    This here is a fantastic example, and I have something similar implemented on my designs..
    Neat and clean way to do it, without putting extra load on apache with having to rewrite urls!
    My development blog - (un)Interesting codesnippets and the occational code-related rant!

Posting Permissions

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