B T
B T

Reputation: 60925

Why is apache changing the browser's url even when I have an [L] mod rewrite rule?

Why is apache ignoring my [L] flag? I would expect to go to myhost.com/wtf and be taken to myhost.com/mediawiki/index.php without the URL in the browser changing. The problem is that the browser url IS changing, and its maddeningly frustrating.

Here's my simple test rule: RewriteEngine On RewriteRule ^/wtf.*$ /mediawiki/index.php [L]

I've ensured that there are no .htaccess files in www, www/html, or www/html/mediawiki. I've tried using the [END] flag as suggested here. I don't have any other rewrite rules in httpd.conf. What could be going wrong?

PS. I curse whoever wrote apache to the depths of hell.

Upvotes: 0

Views: 40

Answers (1)

Walf
Walf

Reputation: 9338

You're omitting the rest of your Apache config or, more likely, the wiki is trying to ensure a canonical URL which isn't configured to the one you want.

Upvotes: 1

Related Questions