Questions tagged [mod-rewrite]

mod_rewrite is an Apache module that allows for server-side manipulation of requested URLs.

For an introduction and examples of using mod_rewrite, read over the comprehensive article,
"Everything You Ever Wanted to Know about Mod_Rewrite Rules but Were Afraid to Ask"

2224 questions
6
votes
2 answers

Apache mod_substitute on HTTP requests to reverse-proxied host

I have the following setup: Printer #1 on LAN Printer #2 on LAN Internet facing Debian Apache 2.2 web server at server-external-ip that I want to use as an IPP gateway to the two printers The two printers are reachable (from LAN and from the…
Danilo Roascio
  • 165
  • 1
  • 6
6
votes
1 answer

Redirecting from one TLD to another

I have two domains for a website (we're using Apache), example.com and example.org. The website responds to a wildcard subdomain for both of these. I want, however, to have the .com as the canonical domain. By that, I mean, I want to redirect (301)…
6
votes
1 answer

When does Apache re-read the updates to .htaccess files?

I have a hosted server. When I update .htaccess, are the updated rules immediately in effect? I understand that hosters can do what they want, and it's impossible to know without knowing the particular policy of this particular hoster. But in the…
Cheeso
  • 572
  • 3
  • 18
6
votes
1 answer

How do I reset Apache's RewriteCond directive?

I have some Apache configuration like this: # Image hotlinking rule RewriteCond %{HTTP_REFERER} ^http://badsite\.com/ RewriteRule .*/static/artwork/.*\.(jpg|png)$ /static/images/hotlink.png [L] # Redirects RewriteRule ^static/artwork/(.+)$ …
DisgruntledGoat
  • 2,629
  • 4
  • 28
  • 36
6
votes
1 answer

Turn off 302 redirect and automatically redirect

I am testing redirects using curl on my localhost. When I run this command: $curl "test.test.com/landing/0192" I get this output: 302…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/linux" class="post-tag grid--cell" title="show questions tagged 'linux'" rel="tag">linux</a> <a href="../../questions/tagged/apache-2.2" class="post-tag grid--cell" title="show questions tagged 'apache-2.2'" rel="tag">apache-2.2</a> <a href="../../questions/tagged/mod-rewrite" class="post-tag grid--cell" title="show questions tagged 'mod-rewrite'" rel="tag">mod-rewrite</a> <a href="../../questions/tagged/redirect" class="post-tag grid--cell" title="show questions tagged 'redirect'" rel="tag">redirect</a> <a href="../../questions/tagged/fedora" class="post-tag grid--cell" title="show questions tagged 'fedora'" rel="tag">fedora</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Dec 07 '11 at 17:26">asked Dec 07 '11 at 17:26</time> <a href="../../users/99035/spencer" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/99035.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Spencer" /> </a> <div class="s-user-card--info"> <a href="../../users/99035/spencer" class="s-user-card--link">Spencer</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">211</li> <li class="s-award-bling s-award-bling__gold" title="1 gold badge">1</li> <li class="s-award-bling s-award-bling__silver" title="2 silver badge">2</li> <li class="s-award-bling s-award-bling__bronze" title="6 bronze badge">6</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-285964"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>6</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status answered-accepted"> <strong>3</strong> answers </div> </div> </div> <div class="summary"> <h3><a href="../../questions/285964/apache2-400-bad-request-with-rewrite-rules-nothing-in-error-log" class="question-hyperlink">Apache2: 400 Bad Request with Rewrite Rules, nothing in error log?</a></h3> <div class="excerpt">This is driving me nuts. Background: I'm using the built-in Apache2 & PHP that comes with Mac OS X 10.6 I have a vhost setup as follows: NameVirtualHost *:81 <Directory "/Users/neezer/Sites/"> Options Indexes MultiViews AllowOverride None …</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/php" class="post-tag grid--cell" title="show questions tagged 'php'" rel="tag">php</a> <a href="../../questions/tagged/logging" class="post-tag grid--cell" title="show questions tagged 'logging'" rel="tag">logging</a> <a href="../../questions/tagged/mod-rewrite" class="post-tag grid--cell" title="show questions tagged 'mod-rewrite'" rel="tag">mod-rewrite</a> <a href="../../questions/tagged/apache-2.2" class="post-tag grid--cell" title="show questions tagged 'apache-2.2'" rel="tag">apache-2.2</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Jun 30 '11 at 21:54">asked Jun 30 '11 at 21:54</time> <a href="../../users/19061/neezer" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/19061.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="neezer" /> </a> <div class="s-user-card--info"> <a href="../../users/19061/neezer" class="s-user-card--link">neezer</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">810</li> <li class="s-award-bling s-award-bling__gold" title="3 gold badges">3</li> <li class="s-award-bling s-award-bling__silver" title="12 silver badges">12</li> <li class="s-award-bling s-award-bling__bronze" title="29 bronze badges">29</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-136428"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>6</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status "> <strong>2</strong> answers </div> </div> </div> <div class="summary"> <h3><a href="../../questions/136428/header-set-access-control-allow-origin-not-working-with-mod-rewrite-mod-jk" class="question-hyperlink">Header set Access-Control-Allow-Origin not working with mod_rewrite + mod_jk</a></h3> <div class="excerpt">My first question on here on SF so please forgive me if I manage to bork the post. :) Anyways, I'm using mod_rewrite on one of my machines with a simple rule that redirects to a webapp on another machine. I'm also setting the header…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/apache-2.2" class="post-tag grid--cell" title="show questions tagged 'apache-2.2'" rel="tag">apache-2.2</a> <a href="../../questions/tagged/mod-rewrite" class="post-tag grid--cell" title="show questions tagged 'mod-rewrite'" rel="tag">mod-rewrite</a> <a href="../../questions/tagged/freebsd" class="post-tag grid--cell" title="show questions tagged 'freebsd'" rel="tag">freebsd</a> <a href="../../questions/tagged/http-headers" class="post-tag grid--cell" title="show questions tagged 'http-headers'" rel="tag">http-headers</a> <a href="../../questions/tagged/mod-jk" class="post-tag grid--cell" title="show questions tagged 'mod-jk'" rel="tag">mod-jk</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Apr 27 '10 at 21:41">asked Apr 27 '10 at 21:41</time> <a href="../../users/30318/tharant" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/30318.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="tharant" /> </a> <div class="s-user-card--info"> <a href="../../users/30318/tharant" class="s-user-card--link">tharant</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">61</li> <li class="s-award-bling s-award-bling__gold" title="1 gold badge">1</li> <li class="s-award-bling s-award-bling__silver" title="1 silver badge">1</li> <li class="s-award-bling s-award-bling__bronze" title="4 bronze badge">4</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-120971"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>6</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status answered-accepted"> <strong>2</strong> answers </div> </div> </div> <div class="summary"> <h3><a href="../../questions/120971/regex-negative-look-ahead-is-not-working-for-mod-rewrite-between-different-apa" class="question-hyperlink">Regex negative look-ahead is not working for mod_rewrite between different Apache versions</a></h3> <div class="excerpt">I have a mod_rewrite line that works under Apache 2.2, but not under Apache 1.3: RewriteRule ^(?!index.php)(?!skin/)(?!js/)(.+) /index.php?file=$1 [NC,L] If I lose the negative look-ahead components between the brackets, I…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/mod-rewrite" class="post-tag grid--cell" title="show questions tagged 'mod-rewrite'" rel="tag">mod-rewrite</a> <a href="../../questions/tagged/regex" class="post-tag grid--cell" title="show questions tagged 'regex'" rel="tag">regex</a> <a href="../../questions/tagged/apache-1.3" class="post-tag grid--cell" title="show questions tagged 'apache-1.3'" rel="tag">apache-1.3</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Mar 10 '10 at 01:26">asked Mar 10 '10 at 01:26</time> <a href="../../users/45104/tjbp" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/45104.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="tjbp" /> </a> <div class="s-user-card--info"> <a href="../../users/45104/tjbp" class="s-user-card--link">tjbp</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">193</li> <li class="s-award-bling s-award-bling__silver" title="3 silver badges">3</li> <li class="s-award-bling s-award-bling__bronze" title="6 bronze badges">6</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-967977"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>5</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status "> <strong>2</strong> answers </div> </div> </div> <div class="summary"> <h3><a href="../../questions/967977/how-to-add-ignore-a-subfolder-in-htaccess-file" class="question-hyperlink">How to add/ignore a subfolder in htaccess file?</a></h3> <div class="excerpt">I have build an app at http://url/sdf19/ I have a .htaccess placed in /sdf19/ containing RewriteRule for clean urls. But I have built a PDF generating tool, which is in a subfolder /inc/tools. I need to link to it direct to run before headers.…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/.htaccess" class="post-tag grid--cell" title="show questions tagged '.htaccess'" rel="tag">.htaccess</a> <a href="../../questions/tagged/mod-rewrite" class="post-tag grid--cell" title="show questions tagged 'mod-rewrite'" rel="tag">mod-rewrite</a> <a href="../../questions/tagged/rewrite" class="post-tag grid--cell" title="show questions tagged 'rewrite'" rel="tag">rewrite</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked May 19 '19 at 15:20">asked May 19 '19 at 15:20</time> <a href="../../users/524262/brad-sullivan" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/524262.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Brad Sullivan" /> </a> <div class="s-user-card--info"> <a href="../../users/524262/brad-sullivan" class="s-user-card--link">Brad Sullivan</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">51</li> <li class="s-award-bling s-award-bling__silver" title="1 silver badges">1</li> <li class="s-award-bling s-award-bling__bronze" title="3 bronze badges">3</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-966946"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>5</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status "> <strong>2</strong> answers </div> </div> </div> <div class="summary"> <h3><a href="../../questions/966946/rewriterule-p-flag-results-in-server-500-error" class="question-hyperlink">RewriteRule "P" flag results in server 500 error</a></h3> <div class="excerpt">I am using RewriteRule in my .htaccess file to modify an incoming URL. It works fine except I want the rule to act as a proxy, rather than a redirect. But if I append the [P] proxy flag to the rule then the rule triggers a 500 error. The Apache logs…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/ubuntu" class="post-tag grid--cell" title="show questions tagged 'ubuntu'" rel="tag">ubuntu</a> <a href="../../questions/tagged/apache-2.4" class="post-tag grid--cell" title="show questions tagged 'apache-2.4'" rel="tag">apache-2.4</a> <a href="../../questions/tagged/.htaccess" class="post-tag grid--cell" title="show questions tagged '.htaccess'" rel="tag">.htaccess</a> <a href="../../questions/tagged/mod-rewrite" class="post-tag grid--cell" title="show questions tagged 'mod-rewrite'" rel="tag">mod-rewrite</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked May 12 '19 at 22:31">asked May 12 '19 at 22:31</time> <a href="../../users/523238/bob-arlof" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/523238.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Bob Arlof" /> </a> <div class="s-user-card--info"> <a href="../../users/523238/bob-arlof" class="s-user-card--link">Bob Arlof</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">171</li> <li class="s-award-bling s-award-bling__bronze" title="4 bronze badges">4</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-960204"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>5</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status answered-accepted"> <strong>1</strong> answer </div> </div> </div> <div class="summary"> <h3><a href="../../questions/960204/htaccess-rewriterule-not-working" class="question-hyperlink">.htaccess RewriteRule not working</a></h3> <div class="excerpt">I have a windows environment using WAMP where this works fine. I am just setting up my Ubuntu desktop development environment, and this particular mod_rewrite is not working. It's pretty basic, but if I go to example.local/files/a-real-file.pdf I…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/apache-2.4" class="post-tag grid--cell" title="show questions tagged 'apache-2.4'" rel="tag">apache-2.4</a> <a href="../../questions/tagged/.htaccess" class="post-tag grid--cell" title="show questions tagged '.htaccess'" rel="tag">.htaccess</a> <a href="../../questions/tagged/mod-rewrite" class="post-tag grid--cell" title="show questions tagged 'mod-rewrite'" rel="tag">mod-rewrite</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Mar 27 '19 at 09:29">asked Mar 27 '19 at 09:29</time> <a href="../../users/470220/chad" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/470220.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Chad" /> </a> <div class="s-user-card--info"> <a href="../../users/470220/chad" class="s-user-card--link">Chad</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">163</li> <li class="s-award-bling s-award-bling__silver" title="1 silver badges">1</li> <li class="s-award-bling s-award-bling__bronze" title="5 bronze badges">5</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-931922"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>5</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status answered-accepted"> <strong>1</strong> answer </div> </div> </div> <div class="summary"> <h3><a href="../../questions/931922/mixing-dbm-rewrite-and-redirect-how-to-stop-rewrite-if-url-is-not-in-list" class="question-hyperlink">Mixing DBM Rewrite and Redirect how to stop Rewrite if url is not in list</a></h3> <div class="excerpt">The scenario: I need to be able to both redirect certain urls and rewrite other URL's Right now after much tinkering I am able to get almost everything to work If I hit the example.com works normally and 200 If I hit the example.com/testrea the text…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/apache-2.4" class="post-tag grid--cell" title="show questions tagged 'apache-2.4'" rel="tag">apache-2.4</a> <a href="../../questions/tagged/centos7" class="post-tag grid--cell" title="show questions tagged 'centos7'" rel="tag">centos7</a> <a href="../../questions/tagged/mod-rewrite" class="post-tag grid--cell" title="show questions tagged 'mod-rewrite'" rel="tag">mod-rewrite</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Sep 20 '18 at 18:55">asked Sep 20 '18 at 18:55</time> <a href="../../users/195875/anthony-fornito" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/195875.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Anthony Fornito" /> </a> <div class="s-user-card--info"> <a href="../../users/195875/anthony-fornito" class="s-user-card--link">Anthony Fornito</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">9,546</li> <li class="s-award-bling s-award-bling__gold" title="1 gold badge">1</li> <li class="s-award-bling s-award-bling__silver" title="34 silver badge">34</li> <li class="s-award-bling s-award-bling__bronze" title="124 bronze badge">124</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-86937"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>5</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status "> <strong>3</strong> answers </div> </div> </div> <div class="summary"> <h3><a href="../../questions/86937/i-need-to-rewrite-https-domain-com-https-www-domain-com-because-of-wildcard-ss" class="question-hyperlink">I need to rewrite https://domain.com => https://www.domain.com because of wildcard SSL</a></h3> <div class="excerpt">Like the subject says I need to rewrite https://domain.com => https://www.domain.com. But I have a wildcard SSL setup for the domain and the root domain does not match *.domain.com, thus the browser brings up an error domain.com uses an invalid…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/apache-2.2" class="post-tag grid--cell" title="show questions tagged 'apache-2.2'" rel="tag">apache-2.2</a> <a href="../../questions/tagged/mod-rewrite" class="post-tag grid--cell" title="show questions tagged 'mod-rewrite'" rel="tag">mod-rewrite</a> <a href="../../questions/tagged/ssl-certificate" class="post-tag grid--cell" title="show questions tagged 'ssl-certificate'" rel="tag">ssl-certificate</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Nov 21 '09 at 13:45">asked Nov 21 '09 at 13:45</time> <a href="../../users/26857/snorri" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/26857.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Snorri" /> </a> <div class="s-user-card--info"> <a href="../../users/26857/snorri" class="s-user-card--link">Snorri</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">111</li> <li class="s-award-bling s-award-bling__silver" title="1 silver badges">1</li> <li class="s-award-bling s-award-bling__bronze" title="3 bronze badges">3</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-83789"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>5</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status answered-accepted"> <strong>3</strong> answers </div> </div> </div> <div class="summary"> <h3><a href="../../questions/83789/need-help-finding-what-is-wrong-with-my-htaccess-not-being-read" class="question-hyperlink">Need help finding what is wrong with my .htaccess not being read</a></h3> <div class="excerpt">I'm trying to use mod_rewrite through the .htaccess files and I have a big problem, the .htaccess files don't seems to be read. The machine is running Debian 5.0 and it's using the stable apache2 package. I've followed instructions from this page:…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/debian" class="post-tag grid--cell" title="show questions tagged 'debian'" rel="tag">debian</a> <a href="../../questions/tagged/apache-2.2" class="post-tag grid--cell" title="show questions tagged 'apache-2.2'" rel="tag">apache-2.2</a> <a href="../../questions/tagged/mod-rewrite" class="post-tag grid--cell" title="show questions tagged 'mod-rewrite'" rel="tag">mod-rewrite</a> <a href="../../questions/tagged/.htaccess" class="post-tag grid--cell" title="show questions tagged '.htaccess'" rel="tag">.htaccess</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Nov 11 '09 at 22:15">asked Nov 11 '09 at 22:15</time> <a href="../../users/22087/nicolas-buduroi" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/22087.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Nicolas Buduroi" /> </a> <div class="s-user-card--info"> <a href="../../users/22087/nicolas-buduroi" class="s-user-card--link">Nicolas Buduroi</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">275</li> <li class="s-award-bling s-award-bling__silver" title="3 silver badges">3</li> <li class="s-award-bling s-award-bling__bronze" title="11 bronze badges">11</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-821838"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>5</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status answered-accepted"> <strong>1</strong> answer </div> </div> </div> <div class="summary"> <h3><a href="../../questions/821838/apache-adds-trailing-slash-despite-rewriterule" class="question-hyperlink">Apache Adds Trailing Slash Despite RewriteRule</a></h3> <div class="excerpt">I'm using a simple .htaccess to handle everything with a PHP script: RewriteEngine on RewriteRule . index.php My index.php just echoes server variables at the moment (with a print_r($_SERVER)); Everything works fine, I type anything in the…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/apache-2.4" class="post-tag grid--cell" title="show questions tagged 'apache-2.4'" rel="tag">apache-2.4</a> <a href="../../questions/tagged/.htaccess" class="post-tag grid--cell" title="show questions tagged '.htaccess'" rel="tag">.htaccess</a> <a href="../../questions/tagged/mod-rewrite" class="post-tag grid--cell" title="show questions tagged 'mod-rewrite'" rel="tag">mod-rewrite</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Dec 20 '16 at 14:38">asked Dec 20 '16 at 14:38</time> <a href="../../users/322743/sidyll" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/322743.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="sidyll" /> </a> <div class="s-user-card--info"> <a href="../../users/322743/sidyll" class="s-user-card--link">sidyll</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">75</li> <li class="s-award-bling s-award-bling__silver" title="1 silver badges">1</li> <li class="s-award-bling s-award-bling__bronze" title="7 bronze badges">7</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="s-pagination pager fr"> <a class="s-pagination--item" href="../../questions/tagged/mod-rewrite_page=4" rel="prev" title="Go to page 4">Prev </a> <a class="s-pagination--item" href="../../questions/tagged/mod-rewrite_page=1" rel="" title="Go to page 1">1</a> <a class="s-pagination--item" href="../../questions/tagged/mod-rewrite_page=2" rel="" title="Go to page 2">2</a> <a class="s-pagination--item" href="../../questions/tagged/mod-rewrite_page=3" rel="" title="Go to page 3">3</a> <div class="s-pagination--item s-pagination--item__clear">…</div> <a class="s-pagination--item" href="../../questions/tagged/mod-rewrite_page=99" rel="" title="Go to page 99">99</a> <a class="s-pagination--item" href="../../questions/tagged/mod-rewrite_page=100" rel="" title="Go to page 100">100</a> <a class="s-pagination--item" href="../../questions/tagged/mod-rewrite_page=6" rel="next" title="Go to page 6"> Next</a> </div> </div> </div> </div> </div> <script src="../../static/js/stack-icons.js"></script> <script src="../../static/js/fromnow.js"></script> </body> </html>