Grow your CSS skills. Land your dream job.

htaccess hide full url

  • # July 2, 2013 at 10:28 am

    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 !

    # July 2, 2013 at 11:11 am

    May I just ask the purpose of such a request?

    __
    # July 2, 2013 at 9:42 pm

    >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)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".