How to make the URL Clean in Zend framework 2

Discussion in 'PHP' started by amskape, Oct 5, 2013.

  1. #1
    Dear friends,
    I install ZF2 on my local wamp pc using composer . But now i got a listing of files in root folder
    as shown below:
    http://postimg.org/image/g8xi9uak7

    But I need the public folder url structure there , without "public" in URL as shown:
    http://postimg.org/image/v2gr8c7p3/
    Please help me how it can done ? Waiting your fast reply

    Thanks,
    Anes
     
    amskape, Oct 5, 2013 IP
  2. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #2
    Move your index.php file from /public to /, and remove the chdir() from the top of it.
     
    nico_swd, Oct 5, 2013 IP
  3. amskape

    amskape Active Member

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    86
    #3
    Thanks nico,

    your answer make my effort successful within 5 minutes (I already spent 6 hrs before lol)

    Anes
     
    amskape, Oct 5, 2013 IP
  4. amskape

    amskape Active Member

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    86
    #4
    Dear Nico,
    I need to write a custom hello world controller and work on it . I try the post in URL : http://bangladeshprogrammer.com/tutorialblog/2013/04/10/zend-framework-2-tutorial-part-3-write-the-hello-world-application-as-module/?WPACRandom=1381079470272#comment-5976
    But not get it work . Please advise how I can create a 'Hello World' stuff?

    Waiting your fast reply
    Thnks
    Anes
     
    amskape, Oct 6, 2013 IP