![]() |
.Htaccess question, How to do this?
What i wanna do is replaceing/redirecting anything/any link starts with http:// to http://ww.exampleurl.com for entire site, including all folders and sub folders.
So how may i do this? |
I assume you are moving permantly from one domain to another.
You need to issue a Movied Permantly http error code of 301 as well then. Options +FollowSymLinks RewriteEngine on RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L] Can't verify it since i'm not running apache anymore. This is for apache, and i'm assuming you are running it. Either paste that in your conf or in a .htaccess file, make sure you can use rewriterules. |
Where do you want to redirect to? You need to be more specific on what you are trying to accomplish.
|
.
You should use a redirectpermanent statement within the virtualhost config of apache
RedirectPermanent URL-path URL http://httpd.apache.org/docs/2.0/mod/mod_alias.html This is the most efficient way of doing it. Mod_rewrite is more resource intensive than mod_alias |
RedirectPermanent (.*) http://exampleurl.com$1
The $1 will include starting '/' Yea, rewrite is always more demanding thanks for updating me on the alias thing.. always more to learn ;) |
What i want to do is, There are some backed up html pages with old affiliate links and i wanna replace them with the new ones, so thats why i look for a comman like;
(redirect anything starts with http to htttp://www.newaffiliatelink.com) |
All times are GMT -7. The time now is 01:52 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc