Robert
Robert

Reputation: 38213

Is it correct to have the query parameters directly after a slash in a URL?

Im getting a 304 redirect from A to B:

Is B the correct form or is the server at fault?

Upvotes: 11

Views: 2702

Answers (1)

vbence
vbence

Reputation: 20333

URLs representing directories are usually ended in trailing slashes, but the URL itself is filesystem-agnostic, so both ways are correct.

The trailing slash is almost certainly done by Apache's mod_dir. The documentation contains some points why is this a good practice. Although:

If you don't want this effect and the reasons above don't apply to you, you can turn off the redirect ...

Upvotes: 7

Related Questions