Web Analytics Made Easy -
StatCounter how to redirect htaccess code? - CodingForum

Announcement

Collapse
No announcement yet.

how to redirect htaccess code?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • how to redirect htaccess code?

    HI Everybody,

    My php pages are strored in www.something.com/httpdocs/vasu folder.
    so that we should be enter web home page like this, http://www.somthing.com/vasu but idont want to enter fullpath of webfolder www.something.com/httpdocs/vasu just simply enter like this: http://www.somthing.com.

    i have written like this:

    ReWritten EngineOn
    ReWriteCond %{QUERY_STRING} ^(vasu)
    RewriteRule ^\vasu$ http://something.com

    what is wrong in my code?

  • #2
    Thanks for asking this question vasu.

    I am also trying to do the same thing for two of my domains and need the solution desperately.

    May be some genius will help us.
    Acai Berry Trial|Acai Berry Supplements
    Acai berry for men|Acai Berry Diets

    Comment


    • #3
      Originally posted by samra1982 View Post
      Thanks for asking this question vasu.

      I am also trying to do the same thing for two of my domains and need the solution desperately.

      May be some genius will help us.
      Coincidence much? Anyway, it sounds like ideally what you are attempting wouldn't be done with mod_rewrite, by the sounds of it, your DocumentRoot directive for apache needs changing.

      Comment


      • #4
        rewritecond %{http_host} ^site.com [nc]
        rewriterule ^(.*)$ http://www.site.com/$1 [r=301,nc]

        This is how you redirect a site. Hope this helps

        Comment

        Working...
        X
        😀
        🥰
        🤢
        😎
        😡
        👍
        👎