Thread: Redirection plz

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2012
    Posts
    2
    Rep Power
    0

    Redirection plz


    Hi friends,

    i want to redirection script for

    websitename/abc/ to websitename/

    my website saved in abc folder. first i set the permenent redirection in Cpanel from websitename to abc folder. but i want to display only website name..don't want to display folder.

    Now, i am using this code.. but not working...

    RewriteRule ^abc/$ / [R=302]

    Please suggest that..
  2. #2
  3. Did you steal it?
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    13,997
    Rep Power
    9397
    There may be a better way of doing this. You mention CPanel so I assume you're on shared hosting. Do you have shell access?
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2012
    Posts
    2
    Rep Power
    0
    Originally Posted by requinix
    There may be a better way of doing this. You mention CPanel so I assume you're on shared hosting. Do you have shell access?
    i am using Godaddy cpanel.... I dont have access reg shell... i am not using shared server. that cpanel only for single domain...
  6. #4
  7. Did you steal it?
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    13,997
    Rep Power
    9397
    Eh, I'll skip the targeted questions.
    Code:
    # send everything through /abc/
    RewriteRule ^/?(.*) abc/$1 [L]
    Unless you have other rewriting rules, and if so depending what they are, this may be all you need.

IMN logo majestic logo threadwatch logo seochat tools logo