Welcome to WebmasterWorld Guest from

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

dot after domain before the slash

FQDN-format duplicate URLs



11:19 am on Oct 15, 2010 (gmt 0)

5+ Year Member

Hey I cant seem to find a solution to my problem,

A site of mine had this problem:


I want all urls after the 3rd dot to redirect to a url without the dot.

for example:

to this:

The dot after com should always be removed.

Hope u can help.


12:21 pm on Oct 15, 2010 (gmt 0)

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

This is a valid "Fully Qualified Domain Name" or "FQDN" format.

You may also get requests like http://www.example.com:80/lots-of-urls-like-these/ and/or http://www.example.com.:80/lots-of-urls-like-these/

Simple enough to take care of these on most servers... What have you tried so far? Do you intend to put a fix into your .htaccess file, and if so, do you have any other working server config code in it? Does this site use (or plan to use) any other subdomains in addition to the current "www"?



12:51 pm on Oct 15, 2010 (gmt 0)

5+ Year Member

I've just tried this:
RewriteCond %{SERVER_PORT} 80
RewriteCond %{REQUEST_URI} somefolder
RewriteRule ^(.*)$ [example.com...] [R,L]
,but this is not at all what i want to do.

Yes i intent to put it in .htaccess.
Yes i have working config code, non-www to www redirect, redirects to take away index.php and a couple of normal Redirect 301's.

No there's no other subdomains other than www. and dont intent to use any other subdomains


12:59 pm on Oct 15, 2010 (gmt 0)

5+ Year Member

I found these 404's while running a scan to check for broken links, i'm scared google picks it up as well, site is a CMS


2:00 pm on Oct 15, 2010 (gmt 0)

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

Replace your existing "non-www to www" redirect with a more robust rule:

# Externally redirect *all* non-blank non-canonical hostname requests to canonical hostname
RewriteCond %{HTTP_HOST} !^(www\.example\.com)?$
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]

This rule redirects if the hostname is not blank and if it is not *exactly* "www.example.com". It therefore catches casing errors, FQDN-format domains, and appended port numbers as previously described.

The "blank exclusion" is for HTTP/1.0 (and prior) requests. If the hostname is blank, then the request is HTTP/1.0, and trying to redirect it will result in an infinite loop, since true HTTP/1.0 requests will always have a blank hostname. Therefore, the embedded blank exclusion is used to prevent this potential loop.

Be sure your rules are in the correct order, as this is critical to success: [webmasterworld.com...]



12:33 pm on Oct 19, 2010 (gmt 0)

5+ Year Member

hey jim,

This rule is a very good replacement for the normal "non www rule" i always used.

For .co.za domains, the condition will look so, (www\.example\.co\.za)?$

and after a big struggle i managed to get the rules in the correct order, yes, very critical to success.


Featured Threads

Hot Threads This Week

Hot Threads This Month