Redirect all pages to new domain with Htaccess

if you want to change your domain name without affecting SEO Ranking in search engines than you should think about 301-page redirect, with 301 redirect you can move your web application to new domain freely.

we can use different methods for setting 301 redirects from old domain to new domain but I am gonna use .htaccess. this method is most preferred, effective and easy.

create the .htaccess file in your old website root folder then put below lines in the .htaccess file.

Here, this one redirects everything after the domain name on the URL to the exact same copy on the new domain URL., for example, arjun.net.in/drag-drop-file-upload-dropzone-js-codeigniter/ will redirect to arjunphp.com/drag-drop-file-upload-dropzone-js-codeigniter/.

if you remove $1 , all pages redirect to home page Ex: arjunphp.com. this will effect search engine rankings.

I hope you like this Post, Please feel free to comment below, your suggestion and problems if you face - we are here to solve your problems.

0 0 vote
Article Rating
Subscribe
Notify of
guest
1 Comment
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Raj
Raj
1 year ago

i have a codeigniter project ..i want to transfer all file pages to new domin but is found error404 how i can redirect all pages

DMCA.com Protection Status
1
0
Would love your thoughts, please comment.x
()
x