Page is a not externally linkable
- Code, Content, and Presentation
-- Apache Web Server
---- Hide/changing .php?=


g1smd - 3:14 pm on Oct 7, 2012 (gmt 0)


You could do it that way, but why having found the period once would you search for it again?

It simplifies to

!\.(gif|jpe?g|png|css)$

but do take a look at the original pattern again:

^book/([a-z0-9-]+)

It says "begins" with "book", then "slash" then "characters or digits", but does not say how it ENDS.

It "allows" requests with period and extension without capturing them.

It should disallow extensions, so think about end anchoring that pattern rather than adding another condition.

Make sure that all links to images and CSS files BEGIN with a leading slash, and mention the full path to the file.

Yes, do disallow upper case URLs in the rewrite process. To allow both cases for any page promotes duplicate content.

Do consider adding a separate ruleset for redirecting upper case requests to lower case. That's a regular question here, so there's plenty of example code.


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