I find I'm the only one coming up with bizarre behavior on my website. Now one of my extremely important links has malfunctioned.
This is the RewriteRule I have that malfunctioned:
RewriteRule ^m/?$ /x.php?MOBILEMODE=m&MAIN=1 [NC,L]
I then test my URLs http://example.com/m and http://example.com/m/ in CURL. http://example.com/m/ is processed correctly, but http://example.com/m takes me to a redirection page. In HTML source code, its this:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>301 Moved Permanently</title> </head><body> <h1>Moved Permanently</h1> <p>The document has moved <a href="http://example.com/m/?MOBILEMODE=m&MAIN=1">here</a>.</p> </body></html>
I'm using apache 2.2.
Is there a simple way to fix this so that http://example.com/m and http://example.com/m/ provide the expected result (of running the x.php script) instead of receiving a redirection message from apache?
I thought adding
/? after m makes the slash optional and I thought this problem would only be caused by including R=301 in the options, but I guess I'm missing something?