1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

htaccess

Discussion in 'Cloaking and Content Generators' started by deuscypher, Jan 11, 2010.

  1. deuscypher

    deuscypher Junior Member

    Joined:
    Jun 8, 2009
    Messages:
    109
    Likes Received:
    17
    Hello,

    I have a problem getting htaccess to work.

    I had this

    Code:
    redirect / www.myaffiliatelink.com
    I saved that as .htaccess.txt and put that in one of my addon domains on public_html. I put it in my domain's folder and the cgi-bin. Nothing really happens. I thought the code didn't make any sense to me. I already redirected my link on cpanel. I just want to cloak/blank my link.

    I saw inside /public_html/mydomain.com<---(Addon domain) that had a .htaccess file, and the code looked something like this

    Code:
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^mydomain.com$ [OR]
    RewriteCond %{HTTP_HOST} ^www.mydomain.com$
    RewriteRule ^/?$ "My affiliate link" [R=301,L] 
    
    I searched the forum and saw alot of variations on this but it all seem to be different.

    If i had to change the code, would i change the .htaccess.txt or .htaccess on /public_html/mydomain.com
     
  2. crashed

    crashed Jr. VIP Jr. VIP Premium Member

    Joined:
    Aug 13, 2008
    Messages:
    958
    Likes Received:
    1,198
    Occupation:
    Guru-slayer
    Location:
    Behind the VPN...
    Home Page:
    Hmmmmmmmmmm, the file needs to be called .htaccess - not .htaccess.txt

    Now if you just want to redirect the entire domain your .htaccess contents should be:

    Code:
    Redirect 301 / http://www.linktoredirectto.com/
    
     
  3. radi2k

    radi2k Junior Member

    Joined:
    Nov 29, 2009
    Messages:
    117
    Likes Received:
    34
    Location:
    Germany
    of course your provider has to enable the required server modules. mod_rewrite for example. and then it need to be allowed in the virtualhost container: AllowOverride FileInfo