1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Hide Folder in url

Discussion in 'Nginx' started by Rocky04, Sep 8, 2016.

  1. #1
    Hi!

    i would like to hide folders in my url

    Like this
    www.example.net/folder/
    www.example.net/folder/entry/abc
    www.example.net/folder/entry/def
    www.example.net/folder/entry/ghxyz
    ...
    and iwant to hide /folder/entry/ in the url like this:
    www.example.net/folder/ (stays)
    www.example.net/abc
    www.example.net/def
    www.example.net/ghxyz


    Is it possible?

    So many thanks for any help.
     
    Rocky04, Sep 8, 2016 IP
  2. Einheijar

    Einheijar Well-Known Member

    Messages:
    539
    Likes Received:
    13
    Best Answers:
    3
    Trophy Points:
    165
    #2
    Yes its possible with nginx rewrite rules
     
    Einheijar, Oct 4, 2016 IP
  3. UrlEmbed

    UrlEmbed Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #3
    You can add location and disable access for this folder in nginx config:
    server {
       ...
    
        location /folder/ {
            deny all;
        }
    }
    Code (markup):
     
    UrlEmbed, Nov 2, 2016 IP