SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Jul 2013
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question two questions! redirection of homepage and https!!

    Both cases are not work/~\

    Apache httpd.conf
    1. how can i redirect XXX.com/ to XXX.com/homepage ??
    ....?
    redirect permanent / https://XXX.com/homepage
    ...?
    what else should i add for this statement?

    2. and how can i redirect from http to https whenever users enter with http??
    <directory C:/.......>
    RewriteEnginee On
    RewriteCond %{HTTPS} !=on
    RewriteRule ^(.*) https://%{SERVER_NAME}/secure/$1 [L,R]
    </directory>

    these codes are tried but nothing can see. i am a new learner (only for one day) in apache, there are many things confusing me!!
    thanks for ans!

  2. #2
    SitePoint Member
    Join Date
    Jul 2013
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PUSH!! anyone know?

  3. #3
    SitePoint Wizard bronze trophy Jeff Mott's Avatar
    Join Date
    Jul 2009
    Posts
    1,313
    Mentioned
    19 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by kaka228 View Post
    redirect permanent / https://XXX.com/homepage
    Try

    RedirectMatch permanent ^/$ https://XXX.com/homepage

    Quote Originally Posted by kaka228 View Post
    <directory C:/.......>
    RewriteEnginee On
    RewriteCond %{HTTPS} !=on
    RewriteRule ^(.*) https://%{SERVER_NAME}/secure/$1 [L,R]
    </directory>
    Mostly this looks good except for one too many "e"s.
    "First make it work. Then make it better."

  4. #4
    SitePoint Member
    Join Date
    Jul 2013
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    THANKS JEFF,
    i have finished this task=) !


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
  •