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

Re: [phpXperts] Re: How can I rewrite Url in php

Expand Messages
  • kray blue
    one thing about rewrite rule is: when you have set it up... the file generated thinks it is located in that directory, one should use absolute path when
    Message 1 of 3 , Jul 6 9:47 PM
      one thing about rewrite rule is: when you have set it up... the file generated thinks it is located in that directory, one should use absolute path when including files and/or stylesheet. i found this when i rewriting urls..
      i could be wrong, its working for me though - if i am.. pls do write back and correct me..i will appreciate it.
      learn the rules so you know how to break them properly -unknown

      ----- Original Message ----
      From: johanmaelson <johanmaelson@...>
      To: phpexperts@yahoogroups.com
      Sent: Wednesday, 5 July, 2006 10:18:34 PM
      Subject: [phpXperts] Re: How can I rewrite Url in php

      > Hello!
      > Please help me that
      > How can I rewrite Url in php?
      > anyone?

      Your question is not distinct. What you want to do make a permalinks
      like this :
      www.yoursite. com/article/ author/Johanmael son/php/
      or just change the header :
      header("location: www.microsoft. com");???

      Smth inside my shell guess that you wanna to make a permalinks :))) So
      it's quite easy
      Create file .htaccess with this content

      RewriteEngine on
      RewriteRule article/author/ ([a-zA-Z] +)/([a-zA- Z]+)
      index.php?show= article&author= $1&article_ name=$2

      Open phpManual on PCRE( Perl Compitable Regular Expressions )

      ============ ===
      With best Wishes : Yuriy Zolotov
      web blog : johanmaelson. wordpress. com

    Your message has been successfully submitted and would be delivered to recipients shortly.