www.webdeveloper.com
Results 1 to 3 of 3

Thread: Mod_rewrite Redirect to folder

  1. #1
    Join Date
    Jan 2005
    Posts
    361

    Mod_rewrite Redirect to folder

    Hey hope some one can help me out with not exactly PHP question

    in Apache mod_rewrite

    How can i configure it so all requests to go separte folder.

    Ex
    some one requests "domain.com" the request will be fowarded to domain.com/files/

    yet i have other folders like domain.com/other_domain/ that should not be touched in any way?

    Hope some one can hel me out tnx!
    ------
    What am I doing?

  2. #2
    Join Date
    Mar 2010
    Posts
    672
    If the domain will always redirect to that subdirectory, i would then just make a static apache redirect and not worry about pattern matching.

  3. #3
    Join Date
    Jan 2005
    Posts
    361
    well problem is that i have multiple domains hosted on the same server and main domain files go to 1st directory. All other domains have the folder in 1st directory

    ex:
    maindomain.com has files in [$root/]
    2nddomain.com has files in [$root/2nddomain/]
    3rddomain.com has files in [$root/3rddomain/]

    so now i want to use my maindomain to host site under it but i dont want to mess up with all other domains so i wanted to move that domain to: [$root/maindomain/]

    Yet, I want to be able to access folders like maindomain.com/3rddomain/ (that would load the same page as if i go to 3rddomain.com)

    I hope i explainded what I need


    But what is the best way to do this i dont know
    ------
    What am I doing?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles