I need to redirect my webpage in the likes of  /dir/script.php?a=123&amp;b=foobar   to  /123/foobar   I've found many answers for questions like this in this site, but none of them work for my problem. The solution from  answer is almost what I need. It works fine for three parameters:  RewriteRule ^([^/]+)/([^/]+)/([^/]+)$ /letters.php?q=$1&amp;d=$2&amp;t=$3 [NC]   But if I try to rewrite it for two parameters, as need in my case:  RewriteRule ^([^/]+)/([^/]+)$ /dir/script.php?a=$1&amp;b=$2 [NC]   I get a 500 Internal Server Error. My script is not even executed. I have tested the regex in Perl and it works fine. There is nothing wrong with it, but Apache somehow refuses to accept it.  I am using the following Apache version:  Server version: Apache/2.4.10 (Debian) Server built:   Nov 28 2015 14:05:48   Can someone help me get this working?  EDIT:  I can't see how this is a duplicate question. The referred question has no mention whatsoever of a dynamic directory based redirection. It mentions named directory redirection, but that is completely different from what I am trying to achieve.  As requested, the log from Apache shows the following:     AH00124: Request exceeded the limit of 10 internal redirects due to   probable configuration error. Use 'LimitInternalRecursion' to increase   the limit if necessary. Use 'LogLevel debug' to get a backtrace.   EDIT2:  It was actually re-matching the /dir/script.php and redirecting indefinitely. The solution was to add the flag END to the RewriteRule, as specified in the :     An alternative flag, [END], can be used to terminate not only the   current round of rewrite processing but prevent any subsequent rewrite   processing from occurring in per-directory (htaccess) context. This   does not apply to new requests resulting from external redirects.
This is a  about Apache's mod_rewrite.   Changing a request URL or redirecting users to a different URL than the one they originally requested is done using mod_rewrite. This includes such things as:   Changing HTTP to HTTPS (or the other way around) Changing a request to a page which no longer exist to a new replacement. Modifying a URL format (such as ?id=3433 to /id/3433 ) Presenting a different page based on the browser, based on the referrer, based on anything possible under the moon and sun. Anything you want to mess around with URL   Everything You Ever Wanted to Know about Mod_Rewrite Rules but Were Afraid to Ask!  How can I become an expert at writing mod_rewrite rules?   What is the fundamental format and structure of mod_rewrite rules? What form/flavor of regular expressions do I need to have a solid grasp of? What are the most common mistakes/pitfalls when writing rewrite rules? What is a good method for testing and verifying mod_rewrite rules? Are there SEO or performance implications of mod_rewrite rules I should be aware of? Are there common situations where mod_rewrite might seem like the right tool for the job but isn't? What are some common examples?   A place to test your rules  The  web site is a great place to play around with your rules and test them. It even shows the debug output so you can see what matched and what did not.
When to use an interface instead of an abstract class and vice versa? This may be a generic OOP question. I wanted to do a generic comparison between an interface and an abstract class on the basis of their usage.   When would one want to use an interface and when would one want to use an abstract class? ravel: opposite meanings? Direct observations of a black hole? Proving there is a sequence convergent to a limit point of a set without axiom of countable choice? Often, we use a construction like this: Given a subset $ A $ of a metric space and its limit point $ a $, we know that for every $ \epsilon &gt; 0 $ there is another point $ x $  different from $ a $ such that $ d(x,a) &lt; \epsilon $. So for every natural $ n $ we let $ a_n $ be such a point within $ 1/n $ of $ a $, which gives us a sequence convergent to $ a $.  My question is, is the axiom of countable choice needed for this construction, or is it formally correct just in ZF? Electromagnetic black hole? So I was thinking about something for the past while  Consider a large spherical foam-ball with homogeneous density. Where a foam ball is defined as an object that can absorb matter with 0 friction (example: a gravitational well without an object inside). This is a purely theoretical construct.  If the foam-ball has a radius R and a charge Q. What charge must the foam-ball have, such that there is well defined sphere or horizon such that any object with a negative charge (even if it is the slightest bit) must travel faster than C in order to escape the field of the ball.  Aka what charge would turn this into a black-hole for all objects with opposite sign on their charge?  Once again I assume the foam-ball is a single particle, that doesn't repel itself... its just a very large homogenous 'thing' with charge. Where to get QGIS toolbar icons? Does anybody know where to download the QGIS toolbar icons? Javascript - alert("zoo">"house") returns true list transparency across non consecutive slides Which is the easiest way to evaluate $\int \limits_{0}^{\pi/2} (\sqrt{\tan x} +\sqrt{\cot x})$? How does ownership in fractional shares work? I've been trying to find out some more information about fractional shares, and how they work. I understand conceptually, you own x% of a share rather than x "full" shares, but I'm curious about how such a system is implemented.  As I understand it, in a "traditional" purchase of shares, the role of a broker is to act as an executor on your behalf, and does not hold any assets themselves. In the case of a fractional share, is this then not the case? For example, the broker holds the complete shares, and then just ensures that they keep an internal record of each partial owner in their system? So there would be no external record of partial ownership?  Thanks! How do I set access permissions per field? What I need to do  I have some user account fields that should be administrator-only (read/write/edit).  For example, the IP address used to register.  So, I want to restrict access to administrators.  Current state of field permissions in Drupal 8 (as of Feb 19, 2016)   In Drupal 7, I used the  module.  However,  There is a , but this has been going on for seven years and is marked as "postponed." Apparently ;-) the standard containers provide some form of guarantees.  What type of guarantees and what exactly are the differences between the different types of container?  Working from  (about ) I have come up with this:  Container Types: ================ Container:     Forward Container         Reverse Container             Random Access Container     Sequence         Front Insert Sequence         Back  Insert Sequence     Associative Container         Simple   Associative Container         Pair     Associative Container         Sorted   Associative Container         Multiple Associative Container  Container Types mapped to Standard Containers =============================================  std::vector:    Sequence    Back        Sequence                    Forward/Reverse/Random Container std::deque:     Sequence    Front/Back  Sequence                    Forward/Reverse/Random Container std::list:      Sequence    Front/Back  Sequence                    Forward/Reverse Container std::set:       Sorted/Simple/Unique    Associative Container       Forward Container std::map:       Sorted/Pair/Unique      Associative Container       Forward Container std::multiset:  Sorted/Simple/Multiple  Associative Container       Forward Container std::multimap:  Sorted/Pair/Multiple    Associative Container       Forward Container   Container Guarantees: =====================                                                                                    Simp                                                                                   or                           For   Rev  Rand        Front  Back  Assoc        Sort   Mult                     Cont: Cont: Cont Cont: Sequ: Sequ:  Sequ: Cont:        Cont:  Cont: Copy    Const:      O(n) Fill    Const:                             O(n) begin()             O(1) end()               O(1) rbegin()                        O(1) rend()                          O(1) front()                                    O(1) push_front()                                     O(1) pop_front()                                      O(1) push_back()                                             O(1) pop_back()                                              O(1) Insert()                                                                          O(ln(n)) Insert: fill                               O(n) Insert: range                              O(n)                                   O(kln(n)+n) size()              O(n) swap()              O(1) erase key                                                     O(ln(n)) erase element                                                 O(1) erase range                                                   O(ln(n)+S) count()                                                       O(log(n)+k) find()                                                        O(ln(n)) equal range                                                   O(ln(n)) Lower Bound/Upper Bound                                                    O(ln(n)) Equality                  O(n) InEquality                O(n) Element Access                       O(1) Omitting fields in Bibliography Python inheritance - how to disable a function In C++ you can disable a function in parent's class by declaring it as private in the child class. How can this be done in Python? I.E. How can I hide parent's function from child's public interface? Duplicate:    I want an pseudo random number generator that can generate numbers with no repeats in a random order. For example: random(10) might return 5, 9, 1, 4, 2, 8, 3, 7, 6, 10 Is there a better way to do it other than making the range of numbers and shuffling them about, or checking the generated list for repeats?  Edit: Also I want it to be efficient in generating big numbers without the entire range.  Edit: I see everyone suggesting shuffle algorithms. But if I want to generate large random number (1024 byte+) then that method would take alot more memory than if I just used a regular RNG and inserted into a Set until it was a specified length, right? Is there no better mathematical algorithm for this. Trackpad not working after update to Ubuntu 14.10 on Dell Inspiron 15R When I updated from 14.04 to 14.10 I noticed my track-pad cursor and left and right mouse clickers were not working. I have tried looking this issue up and can not find any solutions anywhere. If anyone could help me that would be amazing, I am using a wired mouse to my USB port for a temporary fix. I have a Dell Inspiron 15R. D&D 5e and "Theatre of the Mind" in combat Our target play style for combat encounters would be to use battle boards roughly half the time (when there is enough of interest in play that the tactics are fun to play out), and to skip that with faster "cinematic" combat otherwise.  We have not been 100% successful. The problem is the numbers-driven descriptions in the rules. Needing to be "adjacent" (within 5 feet) for abilities such as Protection style fighting, ranged weapon ranges, spell effects and movement speeds are all much easier to resolve on a grid. Running those rules without a board rapidly devolves into sketches with numbers written on them and/or "mother, may I?" style of play because the DM needs to rule who is next to who, and which monsters are in the spell radius. These rulings also quickly get out of sync with player expectations when there is no map and we want to run combats quickly.  It doesn't help that the numbers involved come in pretty much all multiples of the base 5 feet. There is no obvious close/short/medium for effects and ranges. If there were such then I think it would be much easier for the DM to categorise and hand-wave things.  I was hoping that both board-based and no-board style of play would feel equally viable. But the focus on numbers seems to push toward board playing, at least for my group.  We would still like to pay heed to the differences in movement, range, area-of-effect etc of the rules in play. At least in the general sense of creature X is faster than creature Y, or weapon/spell A has better range than weapon/spell B.  Going beyond "just don't sweat the details", how can a group like mine play with the D&amp;D 5e rules as written, without a map, but without leaning on the DM to resolve all our questions of "So, am I next to the Paladin?", or "Is it in range?"      Clarifying: "just don't sweat the details" is a welcome approach to solving the problem, but please give some examples of how this works in practice; i.e. which details can be removed and how? How to check if a binary is 16 bit on Windows Heroes of Might and Magic VI seems to have installed a program called "Uplay", which it uses to launch (in addition to Steam, mind!)  What exactly is Uplay supposed to be? I notice that when I stop playing, it captchalogs the highlights of my past session (achievements earned, etc.) - which is kinda cool, but also kinda creepy and big-brotherish. Given that I value my privacy, is there anyway to play Uplay games without using Uplay?  Is this just Ubisoft's infamous "always-on" DRM? What is the procedure to load LAS files in QGIS 2.0.1? What is the present procedure to load LAS files in QGIS 2.0.1?  After some searching I found a paper outlining the procedure; however, it was for 1.8.something, and related posts here are all rather dated.