.htaccess 301 redirect everything except some custom paths

I need to write a rule in .htaccess to redirect almost any path from an old domain to the homepage of the new domain with a few exceptions.

so as an example, this needs to look something like this:

RewriteEngine On

RewriteCond %{HTTP_HOST} ^[login to view URL] [OR]

RewriteCond %{HTTP_HOST} ^[login to view URL]

RewriteRule ^(.*)$ [login to view URL] [R=301,L]

redirect 301 /old-about [login to view URL]

Using the above code, if I access [login to view URL] I get redirected to [login to view URL] rather than [login to view URL]

Skills: Apache, Linux

See more: htaccess redirect except file, htaccess exclude file from rewrite, htaccess redirect all but two directories, htaccess redirect to https except folder, apache redirect all except one url, htaccess redirect all except one url, apache redirect all except one directory, htaccess redirect all pages except one, 301 redirect htaccess dynamic url creator, 301 redirect canonicalization htaccess seo, 301 redirect htaccess, htaccess 301 redirect dynamic urls, htaccess 301 redirect canonical, 301 redirect htaccess index, 301 redirect htaccess joomla, 301 redirect article htaccess joomla, 301 redirect htaccess command, 301 redirect url htaccess oscommerce, edit htaccess 301 redirect magento

About the Employer:
( 53 reviews ) London, United Kingdom

Project ID: #18008259

Awarded to:


Hello Mate, Warm Greetings! I've understood all the requirements regarding your project. ->I believe my skills and expertise matches really well! I am an experienced PHP Developer and skilled UI originator. More

$15 USD in 1 day
(1 Review)

I have worked as server admin for big names like [login to view URL] and Over 8yrs of working with cpanel, directadmin and plesk servers. Can help you with this. Let me know.

$25 USD in 1 day
(109 Reviews)

6 freelancers are bidding on average $24 for this job


it should be like this RewriteRule ^(.*)$ [login to view URL]%2%{REQUEST_URI} [R,L] I am extremely proficient with Apache and rewrite rules, I have more than 10 years experience with Linux, Windows, Servers setu More

$25 USD in 1 day
(19 Reviews)

"I CAN DO THIS EASILY WITHIN 2 HOURS" I am Full Stack Developer and Expert Designer, having expertise in web development, web UI/UX, Mobile App Development and Designing. Wordpress, Joomla, Magento including payment ga More

$30 USD in 0 days
(4 Reviews)

can do this easily in just 1-2hrs.......................................................................................................................

$25 USD in 1 day
(4 Reviews)

Hi ican do this for you in very cheap price accept my bid and give me opportunity to serve you. may you get some low ball bids, instill fear

$25 USD in 1 day
(0 Reviews)