Re: CentOS 6.8 Apache-2.2.15-53 re-write question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Sat, 2016-05-28 at 13:03 -0600, Paul R. Ganci wrote:

..........

How about

	RewriteEngine on
	RewriteCond %{REQUEST_URI} !^/test/             [NC]
	RewriteCond %{REQUEST_URI} !^/my-folder/        [NC]
	RewriteRule ^(.*)$ http://www.newdomain.com/$1  [R=301,L]

or

	RedirectMatch 301 ^/test/(.*)$        /test2/$1
	RedirectMatch 301 ^/my-folder/(.*)$   /my-folder2/$1
	RedirectMatch 301 ^(.*)$              http://new.domain.com/$1

or

	RedirectMatch 301 ^/usual-directories-names-prefix/(.*)$
		http://new.domain.com/new-directory-names-prefix$1

For many years the practise of using the 'www' prefix has been
depreciated by using just the domain name but also having a DNS A record
for the www for those that love the 'www' prefix.

Having a directory names prefix helps enormously when maintaining
multiple web sites.

Many web sites have a confused illogical jumble of directory names, and
many of those are far too long. Good planing before going live will
subsequently save lots of time and effort. Keep the public directory
structure plain, simple and logical. One never ever needs URL's
exceeding 80 characters.

Avoid things like this

http://www/domain.com/public-communications/press-and-public/press-releases/press-release-12345-man-hits-dog-in-childrens-park.html

and

http://www.dailymail.co.uk/news/article-3615099/Outrage-directed-parents-Harambe-gorilla-s-senseless-death-four-year-old-son-fell-enclosure-led-zoo-officials-fatally-shoot-animal.html

If anyone has to type-in one of your URLs they will definitely
appreciate short URLs where there is less chance of making spelling
mistakes.


 
-- 
Regards,

Paul.
England, EU.      England's place is in the European Union.

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
https://lists.centos.org/mailman/listinfo/centos



[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux