Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: Problems with setting 301 Redirect.

Hybrid View

  1. #1
    Join Date
    Jul 2009
    Location
    Hamburg, Germany
    Posts
    527

    Problems with setting 301 Redirect.

    Hi friends,

    It seems that my traffic is splitting. In google and awstats its showing very big difference in the traffic analysis reports. Google is simply showing half of the traffic only. Am a bit confused.

    But while Checking in a site, both the http//url and http//www url showing search engine friendly. Why?

    I tried to set 301 redirect but in my hosting panel there is no .htaccess file. Am using parellal's plesk panel. So what to do now?

    Do I have to create an htaccess file? If so where? Please do help me., many thanks.
    Follow me on Twitter: @hendricius

  2. #2
    Yes, you should create a .htaccess file at the root of your site, typically the public_html folder.

  3. #3
    You can create the .htaccess file on your PC with a text editor and then upload it to your site's root folder. The file name of this file is .htaccess without any extension such as .txt since it is a hidden file.

    I forget the actual code for the redirect, but there are lots of examples online.

  4. #4
    Join Date
    Jul 2009
    Location
    Hamburg, Germany
    Posts
    527
    Quote Originally Posted by Andy101 View Post
    You can create the .htaccess file on your PC with a text editor and then upload it to your site's root folder. The file name of this file is .htaccess without any extension such as .txt since it is a hidden file.

    I forget the actual code for the redirect, but there are lots of examples online.
    Hi,

    I have the code with me. I tried the same code and file in another hosting and it was successful. But the thing is for this particular blog my panel is parallels plesk 9.2. I dont know to which directory I have to copy this file. I tried to put in the root, but failed. Any idea.?
    Follow me on Twitter: @hendricius

  5. #5
    For Plesk, go to your specific domain in the File Manager, the .htaccess goes in the httpdocs folder.

    If you're using FTP, make sure your ftp client is allowing the viewing of hidden files.

  6. #6
    Join Date
    Jul 2009
    Location
    Hamburg, Germany
    Posts
    527
    Quote Originally Posted by dtkguy View Post
    For Plesk, go to your specific domain in the File Manager, the .htaccess goes in the httpdocs folder.

    If you're using FTP, make sure your ftp client is allowing the viewing of hidden files.
    Hi friend, am using the same filezilla for all my ftp purposes. In this website alone it is not displaying .htaccess file. I did not see htaccess inside httpdocs even in my normal control panel.

    Can I create one there?
    Follow me on Twitter: @hendricius

  7. #7
    Join Date
    Jul 2009
    Location
    Hamburg, Germany
    Posts
    527
    Quote Originally Posted by Shenron View Post
    Yes, you should create a .htaccess file at the root of your site, typically the public_html folder.
    I tried to create an .htaccess file. But the thing is am not sure about where to put the file., I mean which directory. This public html folder can only be found in wp blogs. Isn't it? Mine is not a wp blog.
    Follow me on Twitter: @hendricius

  8. #8
    I tried to create an .htaccess file. But the thing is am not sure about where to put the file., I mean which directory. This public html folder can only be found in wp blogs. Isn't it? Mine is not a wp blog.
    Not all hosting accounts have a public_html folder and it is independent of WP.
    You have to put the .htaccess in the root folder. Often, you will see it like this somewhere: / . It is the highest level folder in your hosting account.

    edit:

    Oh, I see you already tried to put in in the root. Why didn't it work? What did or didn't you see ?

  9. #9
    Join Date
    Jul 2009
    Location
    Hamburg, Germany
    Posts
    527
    Quote Originally Posted by Loko View Post
    Not all hosting accounts have a public_html folder and it is independent of WP.
    You have to put the .htaccess in the root folder. Often, you will see it like this somewhere: / . It is the highest level folder in your hosting account.

    edit:

    Oh, I see you already tried to put in in the root. Why didn't it work? What did or didn't you see ?
    When I tried to create a new file with the help of notepad its showing name as .htaccess.txt. So I downloaded the same .htaccess file from another hosting account, edited it and uploaded it in httpdocs folder of my hosting panel. But still http://newgenresoft.com and http://www.newgenresoft.com exists
    Follow me on Twitter: @hendricius

  10. #10
    Join Date
    Jan 2009
    Location
    Philadelphia, Pennsylvania
    Posts
    1,797
    This is how to remove http:// and make all urls http:// www
    1. Open Notepad.
    2. Paste this into it,

    PHP Code:
    RewriteEngine On
    RewriteCond 
    %{HTTP_HOST} !^www.SITENAMEHERE.com [NC]
    RewriteRule ^(.*)$ http://www.SITENAMEHERE.com/$1 [R=301,L] 
    3. Replace "sitenamehere" with your domain. Do not edit anything else.

    For example, if you were working on NetBuilders you would just replace "SITENAMEHERE" with "netbuilders".

    4. File - Save As - type in ".htaccess" (without the quotes) into the file name box.
    5. You'll see beneath that another box with the default "Text Document" in it. Change that to "All Files" as seen below.



    6. Now, open your FTP Program (you said you use FileZilla) and paste it into the root directory of your site.

    Examples of the root directory are: public_html or httpdocs - just drag the file into that folder. (The title will depend on the software you're using for your server, but typically it will be public_html.)

    If you're using something like Wordpress (I mention this because I think that's what you're using) you just put it in the same directory as all of your files and folders. (Such as wp-admin, wp-content, wp-includes, etc.)

    If this isn't working, I can upload the file for you if needed.

Page 1 of 2 12 LastLast

Similar Threads

  1. Goal Setting
    By Charles in forum Freelancing
    Replies: 24
    Last Post: 9 October, 2011, 00:49 AM
  2. [Free] setting up SB accounts
    By lugaw in forum Services
    Replies: 0
    Last Post: 6 January, 2011, 13:23 PM
  3. setting up blogger in my domain
    By garfish in forum Managing
    Replies: 2
    Last Post: 22 October, 2009, 22:43 PM
  4. Setting up Apache/MySQL/PHP
    By johnting101 in forum Managing
    Replies: 3
    Last Post: 26 August, 2009, 12:53 PM
  5. Trouble setting up phpLD
    By hendricius in forum Directories
    Replies: 7
    Last Post: 21 August, 2009, 14:32 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •