www.webdeveloper.com
Results 1 to 3 of 3

Thread: .htaccess url rewrite

  1. #1
    Join Date
    Mar 2009
    Posts
    452

    .htaccess url rewrite

    Hi all,
    im trying to rewrite following url:
    Code:
    http://www.domain.com/index.php?t=abc&a=download
    to:
    Code:
    http://www.domain.com/abc/download

  2. #2
    Join Date
    Nov 2008
    Posts
    2,477
    I assume the issue you are having is that you don't know the syntax to do this? I'm also assuming that the two parts of the URL in your example are both variable since you don't say.

    Code:
    <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteBase /
        RewriteRule ^([^/]+)/([^/]+)$ index.php?t=$1&a=$2 [L]
    </IfModule>
    The first rule of Tautology Club is the first rule of Tautology Club.

  3. #3
    Join Date
    Mar 2009
    Posts
    452
    Thanksssssssssssssssss alot!!!!!!!
    it works for me when i type
    Code:
    http://www.domain.com/abc/download
    but is dosent when i type
    Code:
    http://www.domain.com/abc/download/
    i mean when a slash is added at the end or i want to add more variables, is there some way to do that in same way..,
    Again thanxxxxxxxxxxxx
    Last edited by ZABI; 02-23-2010 at 01:00 PM.

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