[bug] Add New Redirect

zEitEr

Super Moderator
Joined
Apr 11, 2005
Messages
15,366
Location
www.poralix.com
Hello,

As it seems that Apache ignores everything that comes after ? (question mark) in Redirect directive, I'd suggest deny using ? (question mark) in "Local URL Path" field on page /CMD_REDIRECT? when adding a new redirect. It confuses users.

http://httpd.apache.org/docs/current/mod/mod_alias.html#Redirect

To test it:

add two new redirects on your page:

http://domain.com:2222/CMD_REDIRECT?DOMAIN=domain.com

Code:
Local URL Path: /test/?foo=bar
Redirect Type: whatever you'd like
Destination URL: http://domain.com/page1

Code:
Local URL Path: /test/
Redirect Type: whatever you'd like
Destination URL: http://domain.com/page2

Then go to both redirects:

=> http://domain.com/test/?foo=bar
=> http://domain.com/test/

Where do you think you'll be redirected? To http://domain.com/page2 undesirably in both cases.

Thus apache ignores ?foo=bar. So why directadmin allows then to use it?


p.s. of course, custom editing of skins and post/pre scripts would help us, but what about the others?
 
Of course, apache does not ignore a question mark at all, it respects it in Redirect rules , but when it does matching rules against a requested URL, it discards everything after the mark in URL.
 
Back
Top