Page is a not externally linkable
- Code, Content, and Presentation
-- Apache Web Server
---- mod rewrite: url with a dot not redirecting


lucy24 - 5:39 am on Nov 28, 2011 (gmt 0)


:: runs around for a few minutes screaming in horror ::

Last week I was faced with the rhetorical query: What's worse than an initial (.*) ? Two initial (.*) sets. Now in one fell swoop we've got FOUR.

:: pause for some more screaming ::

What is the .* meant to cover? If it's a single directory name, you want [^/]+. That's + not * unless your site is weighted down with malformed URLs along the lines of

www.example.com///g//page// (rule 6)
or
www.example.com//g--page- (rule 5)

By the time you've executed those first six rules-- assuming your server is still standing-- what's left for the final Rule and its Conditions?

/shopping/some-path-name-5.5/100/1

... should be redirecting to

/shopping/some-path-name-55/100/1


I'm getting a headache. Which of your rules 4-6 (the three that redirect to /shopping/ and don't exclude literal periods) is supposed to have this result?

RewriteCond %{REQUEST_URI} !//

Seems a bit superfluous, since your first six Rules all allow for // and even ///

:: sob ::


Thread source:: http://www.webmasterworld.com/apache/4391552.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com