GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   .Htaccess question, How to do this? (https://gfy.com/showthread.php?t=1007313)

AtlantisCash 01-24-2011 04:45 AM

.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?

Traxman 01-24-2011 06:08 AM

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.

jonnydoe 01-24-2011 06:13 AM

Where do you want to redirect to? You need to be more specific on what you are trying to accomplish.

pumpercloggs 01-24-2011 06:44 AM

.
 
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

Traxman 01-24-2011 07:22 AM

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 ;)

AtlantisCash 01-24-2011 08:03 AM

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