Loading ...
Sorry, an error occurred while loading the content.

Need help in mod_rewrite

Expand Messages
  • Anees
    i need to redirect the subdomain part of a URL as one of the variable into a file ie the link should be www.subdomain.site.com/post.php?id=89 and it should go
    Message 1 of 3 , Aug 12 11:04 PM
    • 0 Attachment
      i need to redirect the subdomain part of a URL as one of the variable into a file

      ie
      the link should be
      www.subdomain.site.com/post.php?id=89

      and it should go into
      www.site.com/post.php?id=89&s=subdomain

      Please help

      Regards
      Anees Muhammed
      ___________




      [Non-text portions of this message have been removed]
    • Harsha M V
      http://www.workingwith.me.uk/articles/scripting/mod_rewrite http://www.sitepoint.com/article/guide-url-rewriting cehck out these two tutorials. i suggest you
      Message 2 of 3 , Aug 13 3:26 AM
      • 0 Attachment
        http://www.workingwith.me.uk/articles/scripting/mod_rewrite

        http://www.sitepoint.com/article/guide-url-rewriting

        cehck out these two tutorials. i suggest you write the rules on your own by
        understanding it, so that you'll learn. in case you dont. some one wil help
        you..

        i suggest you learn about regular expression also..

        --
        Harsha M V
        {http://hmv.co.in}


        [Non-text portions of this message have been removed]
      • Anees
        Hello Harsha Thanks for ur time i went through ur reffered sites i found some code from some other sites also and i tried to sort out the problem the code
        Message 3 of 3 , Aug 13 4:56 AM
        • 0 Attachment
          Hello Harsha

          Thanks for ur time

          i went through ur reffered sites

          i found some code from some other sites also
          and i tried to sort out the problem

          the code snippet is

          RewriteCond %{HTTP_HOST} !^(www\.)?sitename\.com$ [NC]
          RewriteCond %{HTTP_HOST} ^(.+)\.sitename\.com$ [NC]
          RewriteRule .* /index.php?subdomain=%1 [L]

          but it is coming just a
          'Server not Found' error

          so;
          please help if u have any hint towards.

          Regards
          Anees Muhammed
          ___________




          ----- Original Message ----
          From: Harsha M V <hmvrulz@...>
          To: bang-phpug@yahoogroups.com
          Cc: phpexperts@yahoogroups.com; php 4 india <php4india@yahoogroups.com>; phpgroup2 <php-objects@yahoogroups.com>
          Sent: Wednesday, August 13, 2008 3:56:44 PM
          Subject: Re: [bang-phpug] Need help in mod_rewrite


          http://www.workingw ith.me.uk/ articles/ scripting/ mod_rewrite

          http://www.sitepoin t.com/article/ guide-url- rewriting

          cehck out these two tutorials. i suggest you write the rules on your own by
          understanding it, so that you'll learn. in case you dont. some one wil help
          you..

          i suggest you learn about regular expression also..

          --
          Harsha M V
          {http://hmv.co in}

          [Non-text portions of this message have been removed]






          [Non-text portions of this message have been removed]
        Your message has been successfully submitted and would be delivered to recipients shortly.