Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • how can i replace til=main for something like til=%1 ?? Commented Jun 2, 2014 at 22:13
  • yep it works! ... quick question is there any problem if i use it like this: RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(.*)?til=([^&\ ]+)\ HTTP RewriteRule ^ /folder/%2? [R=301,L] it seems to work fine with both index.php?til=xxxx and ?til=xxxx Commented Jun 2, 2014 at 22:20
  • 1
    @Ered (.*) It matches any character (except line breaks) which appears zero or more time on first capturing group (which you can refer with $1). While the latter ([^&\ ]+) matches any character except &, \ and spaces with one or more time on second capturing group which referred with $2. Commented Jun 2, 2014 at 22:27