Powered by eUKhost®

Announcement

Collapse
No announcement yet.

Simple RewriteRule to set redirect for domain.

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

  • Simple RewriteRule to set redirect for domain.

    We can set redirect for domain by using following RewriteRule entry in .htaccess
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^xyz.com$ [OR]
    RewriteCond %{HTTP_HOST} ^www.xyz.com$
    RewriteRule ^(.*)$ http://www.xyz.com/test//$1 [R=301,L]

    The above entry redirect the domain xyz.com to xyz.com/test
    Regards
    George

  • #2
    Thank you. I wanted this code for a long time now. And all the time, it was right under my nose here!

    Comment


    • #3
      Thank you, I appreciate the information you have given, as well as the codes you have shared with me. Your expertise and help have been invaluable.
      A true friend never gets in your way unless you happen to be going down.
      Arnold H. Glasow

      How To French Kiss

      Comment

      ban-img
      Working...
      X