Announcement

Collapse
No announcement yet.

nice URL Rewrite. How to get Greedy?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • nice URL Rewrite. How to get Greedy?

    Hello!

    I want to have "domain.com/search" pull up the normal search page (first line), but then I also want it to use a query if a subfolder is entered in the URL like so for the second line:

    "domain.com/search/fooBar"

    search = first line
    search/*whatever* = second line

    It has to do with the damn slash

    I keep getting the same search page and no page that utilizes the query! Help!

    # Search
    RewriteRule ^search /includes/payloads/search.php [NC]
    RewriteRule ^search/([^/]+) /includes/payloads/search.php?q=$1 [NC]

  • #2
    RewriteRule ^search(/.*)?$ your/path/search.php?q=$1 [QSA,L,NC]

    Comment

    Working...
    X