Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End htaccess hide full url

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #46029
    Arthur
    Participant

    Hi everyone.
    Please help me to hide my site’s url with htaccess
    My site url is http://somesite.am/Site/am/index.php
    and want it to become http://somesite.am
    Thank you !

    #141290
    Kitty Giraudel
    Participant

    May I just ask the purpose of such a request?

    #141375
    __
    Participant

    >Please help me to hide my site’s url with htaccess My site url is http://somesite.am/Site/am/index.php and want it to become http://somesite.am

    This is _not_ a job for htaccess. If you want to use a particular address in the address bar, type it there.

    Do This!
    NOT THIS, silly!

    mod_rewrite’s job (whether in apache’s config or an htaccess file) is to rewrite requests _for the server_, not for the browser.

    When someone types/clicks `http://somesite.am`, mod_rewrite can catch that URL and rewrite it so it serves what you desire. For example,

    RewriteEngine On

    # sends all requests for “/” to “/Site/am/index.php”
    RewriteRule ^/$ /Site/am/index.php

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Back End’ is closed to new topics and replies.