So I can clearly do this:  RewriteCond %{REQUEST_FILENAME}\.php -f   But I cannot do this:  RewriteCond some_directory/%{REQUEST_FILENAME}\.php -f   Furthermore, this also fails:  RewriteCond prefix%{REQUEST_FILENAME} -f   Presuming of course those files exist in the directory (duh!).  Apparently, I can't prepend literal strings to TestStrings in RewriteCond stanzas in Apache 2.4  Anyone know how to do this? Thanks.  Note: Prepending string literals is done in the same way as appending.  I had misattributed the problem as a limitation of the syntax.  The truth was that "REQUEST_FILENAME" expanded to the full unix path, not the HTTP requested path, as I had originally thought.  tl;dr There is no special syntax provision for prefixing string literals; they work the same way they do in shell scripting, prefix%{variable}postfix is valid syntax.  Thanks for your time.
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.
Why is there no consistency in the plural forms of words ending on an "f" (e.g. safe, roof, dwarf, etc.)? The plural form of leaf is leaves, although according to  leafs is also correct. Dwarf can be pluralized as either dwarfs or dwarves. Conversely, the words roof and safe are pluralized as roofs and safes.  Is there any logic underpinning these variations? Is there a historical trend where words that were previously pluralized as -ves are now being increasingly pluralized as -fs? First appearance of a predominately black cast in a TV show I was watching MeTV the other day, which is a fantastic station chock-full of old-time TV shows.  In one sitting I saw episodes of Superman, Batman, Wonder Woman, The Rifleman and Star Trek (TOS).  So it got me thinking...  None of these shows has many (if any) black actors.  And now I'm curious as to which TV show was the first to feature a predominantly black cast.  Anyone know?  I'm thinking back to What's Happening, Good Times, The Jeffersons...  But were there any before then? If I use  two different router in the same network while both are running in the default router mode then we can access the setup page or setup interface from browser just by IP address of corresponding router. But when I use one of the router as repeater then I can only enter the setup page of the router which is running in router mode. Why router's setup page cannot be accessed when using the router as repeater? Now how can I change the settings of the router in repeater mode? The only way is to reset router with the hardware key then setup again. I  here on MSO today, but it was found to have been asked .  I'm not concerned by this (better to be found by more than one user) but, I noticed that the wording in the closure statement is factually incorrect:    No it doesn't have an answer - Not even a sniff of one!  This statement, logically, should be factually accurate and reflect the existence of answers and include singular/plural references to them - or at a minimum use language that covers both scenarios.  Edit: As a result of my question,  and the bug in question has been remedied, but this question still remains valid. Check a string to see if all characters are hexadecimal values Show that every irrational number in $\mathbb{R}$ is the limit of a   sequence of rational numbers. Every rational number in $\mathbb{R}$ is   the limit of a sequence of irrational numbers.   How can I prove this? Points disappear when zooming past certain scale in ArcMap? My points are disappearing when I zoom in past 300,000 in ArcMap.  I tried to repair geometry, but it doesn't fix anything?    I also checked the scale extents and those are turned off.  I can export the points to a new shapefile/feature class, but I'd like to not have to do that.    I'm using 10.1 on Windows 7 x64. I'm starting to write a book on . Since I've been contributing on this tag for a long time, I had the opportunity to read &amp; answer several interesting threads on Stackoverflow related to this technology.  I would like to discuss some of the interesting cases published on Stackoverflow in my book, and I wonder if I could use the images and code shared on those threads in it.  I'm hoping somebody from StackExchange could clarify about the copyright status of the material shared on Stackoverflow questions/answers. Which notation and why: $\text{P}()$, $\Pr()$, $\text{Prob}()$, or $\mathbb{P}()$ Why is my profile messed up on a single site and how can I revert it? I was just asking a question on Gardening SE and suddenly my user name there is a25bedc5-3d09-41b8-82fb-ea6c353d75aand my picture is replaced by a Gravatar. My location is also left blank.  Here's a   Curiously, my profiles on all other sites are fine.  I don't have a separate login for SE, I log in using my Google account. Nobody other than me has access to my Google account. I use two step authentication and I can see on "recent devices" in Google that no one but me has accessed my Google account. I only access SE from home, and nobody other than me has used my devices.   I tried to edit my Gardening SE profile back to the way I want it to be and I got the following message:     Oops! There was a problem updating your profile:   Display name may only be changed once every 30 days; you may change again on Jun 20 at 10:49   I'm assuming this is because I changed the "about me" on all SE sites two days ago.  I never edit my profiles individually. I always apply changes to all sites, using the same profile on all sites.  I have certainly not made such strange (or any) edits to my profile on Gardening SE.  Why did this happen, and how can I get my proper user name and picture back on Gardening SE? Do I really have to wait for a whole month? I want to use the site, and I want them to recognize me as the user they know. I don't want to wait a whole month.  Update: The Gardening SE moderator Niall C. helped me out, and he offered the following potentially relevant information:     I changed your display name on Gardening &amp; Landscaping back to "Fiksdal". Your profile history shows that your profile image (from your headshot on imgur.com to a gravatar), email, about me also changed at the same time as your display name on May 21. It also shows that I changed your profile image to a different gravatar when I changed your display name just now... weird! – Niall C. 1 hour ago How to fill a rectangular hole with an even amount of vertices on either side? I tried crating faces but it left missing edges. In the end I was left with all the right lines but there was no vertex in the center.    Here's a follow up image in case you're wondering what I mean. Notice how there's no vertex in the center. Why are date-based hats awarded too early? I just got the  hat which states "post or vote on December 21".  Does SE have a time machine now? Non-existence of a Surjective Function from a Set to Its Subsets (Cantor's theorem) EntityFieldQuery order by title Clarification of the "25D" option in ogr2ogr Evaluating $\frac{1}{2\pi}\int_{0}^{2\pi}\frac{1}{1-2t\cos\theta +t^2}d\theta$ I need solve this integral, and I tried various methods of solving and did not get it. The integral is:   $$\frac{1}{2\pi}\int_{0}^{2\pi}\frac{1}{1-2t\cos\theta +t^2}d\theta,$$  where $t$ is a positive integer. When is a MOSFET more appropriate as a switch than a BJT? How can I install apt packages non-interactively? Running a script during booting/startup; init.d vs cron @reboot I am currently trying to understand the difference between init.d and cron @reboot for running a script at startup/booting of the system.   The use of @reboot (this method was mentioned in  by hs.chandra) is some what simpler, by simply going into crontab -e and creating a @reboot /some_directory/to_your/script/your_script.txt and then your_script.txt shall be executed every time the system is rebooted. An in depth explanation of @reboot is   Alternatively by embedding /etc/init.d/your_script.txt into the second line of your script ie:  #!/bin/bash # /etc/init.d/your_script.txt  You can run chmod +x /etc/init.d/your_script.txt and that should also result for your_script.txt to run every time the system is booted.  Q1: What are the key differences between the two? Q2: Which is more robust? Q3: Is there a better one out of the two? Q4: Is this the correct way of embedding a script to run during booting?  I will be incorporating a bash .sh file to run during startup. Analogue of spherical coordinates in $n$-dimensions What's the analogue to spherical coordinates in $n$-dimensions? For example, for $n=2$ the analogue are polar coordinates $r,\theta$, which are related to the Cartesian coordinates $x_1,x_2$ by  $$x_1=r \cos  \theta$$ $$x_2=r \sin  \theta$$  For $n=3$, the analogue would be the ordinary spherical coordinates $r,\theta ,\varphi$, related to the Cartesian coordinates $x_1,x_2,x_3$ by  $$x_1=r \sin  \theta  \cos  \varphi$$ $$x_2=r \sin  \theta  \sin  \varphi$$ $$x_3=r \cos  \theta$$  So these are my questions: Is there an analogue, or several, to spherical coordinates in $n$-dimensions for $n&gt;3$? If there are such analogues, what are they and how are they related to the Cartesian coordinates? Thanks.