Welcome to Welcome to DNF.com™ - Domain Sales, Domain Forum, Domain Appraisals, Domain Registrars

If you are new to domains and looking to buy, sell and learn about domains then you have come to the right place. DNForum is the largest domain name community on the internet and continues to grow every day. There are over 105,000 domainers on DNForum doing everything from buying domains, selling domains, learning about domains and discussing domains. Take a minute and Register.

Register Today on DNForum IT'S FREE!

Results 1 to 2 of 2
  1. #1
    Platinum Lifetime Member
    darmar's Avatar
    Join Date
    Dec 2006
    Location
    Zagreb, Croatia
    Posts
    96
    DNF$
    240
    Bank
    0
    Total DNF$
    240
    Donate  

    HTACCESS RewriteRule problem

    I need some more help....

    I can't get to "reuse" variables I'm passing through....

    here's my example:
    RewriteEngine On
    RewriteRule ^[a-zA-Z]{5}$ /test.php?myvar=%1 [R=301,L]
    (yes, I'm trying to redirect all "www.example.com/abcde" calls to a specific PHP script, with that "abcde" pass as variable)

    with this, I get redirected to: "test.php?myvar=" and no value for this variable "myvar"....

    I also tried using "$" instead of "%" in RewriteRule statement - but I get the same....

    could anybody post a working example of passing variables to script you're redirecting with RewriteRule ?


    thank you



    =================
    reply added:
    =================

    here's the solution for my latest problem:

    RewriteEngine On
    RewriteRule ^([a-zA-Z]{5})$ /test.php?myvar=$1 [R=301,L]
    I forgot to use ( ) and I should use $ instead if %
    Last edited by darmar; 07-12-2007 at 10:43 AM. Reason: Automerged Doublepost

  2. #2
    Platinum Lifetime Member
    darmar's Avatar
    Join Date
    Dec 2006
    Location
    Zagreb, Croatia
    Posts
    96
    DNF$
    240
    Bank
    0
    Total DNF$
    240
    Donate  
    here's a nice simple tutorial I wrote:
    friendly url

Similar Threads

  1. Strange and mysterious problem => I'm a bit worried now ...
    By DomainEmpire.com in forum Help Wanted!
    Replies: 9
    Last Post: 03-13-2007, 02:45 AM
  2. Need htaccess help please....
    By slobizman in forum Search Engines and Traffic Building
    Replies: 1
    Last Post: 07-04-2006, 11:31 AM
  3. Adsense Problem
    By Stinos in forum DNForum PPC Templates
    Replies: 11
    Last Post: 03-19-2005, 06:07 AM
  4. SECURITY ALERT: Bogus Whois Problem Reports
    By Domagon in forum General Domain Name Discussion
    Replies: 2
    Last Post: 11-05-2004, 06:10 PM
  5. BIG Problem Accessing This Site
    By Duke in forum Gold Cafe
    Replies: 6
    Last Post: 09-21-2002, 04:27 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Domain name forum recommended by Domaining.com