need help about urlrewrite

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • wesley1970
    New Member
    • Nov 2007
    • 15

    need help about urlrewrite

    In apache, i set override all,
    open rewrite mode..
    I have installed wordpress into it. It can rewrite url. That means my setting is correct.
    Look at wordpress htaccess, something like this

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /wordpress/
    RewriteCond %{REQUEST_FILEN AME} !-f
    RewriteCond %{REQUEST_FILEN AME} !-d
    RewriteRule . /wordpress/index.php [L]
    </IfModule>

    Ok, now i have a file, i want to click it to <a href="test.php? id=123">click </a>

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /wordpress/
    RewriteCond %{REQUEST_FILEN AME} !-f
    RewriteCond %{REQUEST_FILEN AME} !-d


    RewriteRule ->Here what should I write to change it into->test.html/id/123 -->Something like this?



    </IfModule>
  • realin
    Contributor
    • Feb 2007
    • 254

    #2
    i always wanted to ask the same question, but in a different swing ..

    I want to know if i have a site with bunch of pages having URL pattern like
    Code:
    http://mypage.php?id=90&act=register
    then writing a code(given below) in .htaccess file would turn my links into
    http://mypage.php/90/register automatically ?

    If no, then how do wordpress/drupal/joomla do it ?
    If yes, then why isn't my .htaccess file doing it ..
    Here is the code which i am expecting to serve the purpose..

    Code:
    RewriteEngine on
    RewriteRule ^mypage/(.*)/(.*)$ mypage.php?id=$1&act=$2[NC]
    Please let me know, thanks :)

    P.S. I wanted to avoid a new thread, so i added the question in an existing thread for more relevant answers. Hope Admin won't mind it..

    Comment

    • realin
      Contributor
      • Feb 2007
      • 254

      #3
      No replies :O
      do i need to post this in PHP forum ? But then its gonna be a wrong section, please help me, its urgent

      Comment

      Working...