www.webdeveloper.com
Results 1 to 7 of 7

Thread: mod_rewrite rule help

  1. #1
    Join Date
    Jun 2011
    Posts
    3

    Lightbulb mod_rewrite rule help

    Hi,

    I am on lighttpd engine and I have one doubt :-

    I am planning to transfer my forum from http://mydomain.com/forum to http://mydomain.com

    so I need to do something with mod_rewrite rule, as I am running in lighttpd engine, so i need to edit lighttpd.conf folder for it.

    Now my doubt is what would be the command to write :- what i think is this :-
    Code:
    "^/forum/(.+)" => "http://www.mydomain.com/$1",
            "^/forum/([^&?]*)&([^?]*)$" => "http://www.mydomain.com/$1?$2",
    	"^/forum/([^&?]*)&([^?]*)\?(.*)$" => "http://www.mydomain.com/$1?$2&$3",
    or this:-

    Code:
    "^/forum/(.*)" => "http://www.mydomain.com/$1",
            "^/forum/$1?$2" => "http://www.mydomain.com/$1?$2",
    	"^/forum/$1?$2&$3" => "http://www.mydomain.com/$1?$2&$3",
    Now Please suggest me solution... I have not tested it, nor i am not in option to test it, so if any of you have any idea or have some experience than do kindly reply back with your best solution.

    Thanks

  2. #2
    Join Date
    Jun 2011
    Posts
    6
    Code:
    "^/forum/(.+)" => "http://www.mydomain.com/$1",
            "^/forum/([^&?]*)&([^?]*)$" => "http://www.mydomain.com/$1?$2",
    	"^/forum/([^&?]*)&([^?]*)\?(.*)$" => "http://www.mydomain.com/$1?$2&$3",
    Not sure if this is what you need. How many variables do you have ? For such simple rewrites you have mod_rewrite generators on internets for free so you can check there. And search a litle on google cuz I'm shure I have seen something like that allready, when I was looking for a solution on my problem...

  3. #3
    Join Date
    Jun 2011
    Posts
    3

    Question

    can some one knowledgable reply here, and not just copy pasting my code...like above.

  4. #4
    Join Date
    Jun 2011
    Posts
    6
    Ty for appreciating my reply... ANY way I copy pasted your CODE TO : tell you that I'm not shure IF this code IS RIGHT. If you don't understad what people say ( write ) ride it more times until you kach what he/ she is trying to say.

    Google is your frend so search for it, and don't poste just a question without googlin first!

    Code:
    And search a litle on google cuz I'm shure I have seen something like that allready
    Ty again...

  5. #5
    Join Date
    Jun 2011
    Posts
    6
    Thank you for appreciating my reply. I copy pasted that "code" of yours by saying that I dont think thats what you need ( its wrong ). And please IF you DON'T understand what someone says, writes read it more time so you understand what the person wants to say!

    Code:
    And search a litle on google cuz I'm shure I have seen something like that allready
    So search, and don't post just cuz your lazy to search...

  6. #6
    Join Date
    Jun 2011
    Posts
    3

    Exclamation

    you have no idea to whom you asking for google, though i made quick google search but I am sure, there is no solution for it, till now,=> I am asking if some one has solution or has come to same problem in past can reply here to help me out.

    @Proply => I request not to reply my thread now, Do not make this thread idiotic. I dont have time for nonsense.

    I am waiting for some gentleman with some real solution posting to it. and not some one trying to be smart and showing their presence here in my thread, hope that was clear to you.

    Thanks

  7. #7
    Join Date
    Jun 2011
    Posts
    6
    @WorldOFHacker => Sorry thats not gona happen.

    You are waiting for some gentlmen to reply, but your not a gentlmen your own.
    You are insulting me... And I don't like that, I was trying to help you, cuz if you didn't notice I asked a simpliery question and no one replyed to it, so I wanted to help you. But no you know best. Ok then wait until someone "knowledgable" replays to it.

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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