![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: Dec 2005
Location: Istanbul - Turkiye
Posts: 3,169
|
.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? |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Registered User
Industry Role:
Join Date: Dec 2010
Location: Close to internet
Posts: 58
|
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.
__________________
Just because I know a lot of things, dont mean I know everything ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Industry Role:
Join Date: Aug 2006
Location: USA
Posts: 543
|
Where do you want to redirect to? You need to be more specific on what you are trying to accomplish.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Join Date: Mar 2007
Posts: 118
|
.
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 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Registered User
Industry Role:
Join Date: Dec 2010
Location: Close to internet
Posts: 58
|
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 ;)
__________________
Just because I know a lot of things, dont mean I know everything ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Confirmed User
Join Date: Dec 2005
Location: Istanbul - Turkiye
Posts: 3,169
|
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) |
![]() |
![]() ![]() ![]() ![]() ![]() |