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 3 of 3
  1. #1
    Platinum Lifetime Member
    screamfine's Avatar
    Join Date
    Mar 2005
    Posts
    220
    DNF$
    786
    Bank
    0
    Total DNF$
    786
    Donate  

    mod_rewrite freaks ... I need your help!

    I have an URL like this:

    http://www.mydomain.com/index.php?_id=just-a-test

    I want to rewrite this into the following:

    http://www.mydomain.com/just-a-test.html

    My .htaccess file looks like this:

    Code:
    RewriteEngine On
    RewriteBase /
    RewriteRule ^([^-]+)-(.+)\.html$ index.php?_id=$1&_news=$2 [L] 
    RewriteRule ^(.+)\.html$ index.php?_id=$1 [L]
    The problem is:

    http://www.mydomain.com/index.php?_id=just-a-test
    becomes:
    http://www.mydomain.com/das.html ("a-test" is missing...)

    All hyphens and parameters get lost ... what am I doing wrong?

    I'm looking forward to your replies!

    Thank You!

    P.S. My Apache version is: Apache/2.0.50 (Linux/SUSE).
    Easily manage all of your link exchanges: Link Exchange Script

  2. #2
    Social Media Evangelist
    dotcomgiant's Avatar
    Join Date
    Feb 2005
    Location
    Hyderabad
    Posts
    778
    Country

    India Follow dotcomgiant On Twitter Add dotcomgiant on Facebook
    DNF$
    4,588
    Bank
    0
    Total DNF$
    4,588
    Donate  

    Re: mod_rewrite freaks ... I need your help!

    Not sure, you may try something like :
    Code:
    Options +FollowSymLinks
    RewriteEngine on
    RewriteRule ^([a-zA-Z_-]+).html index.php?_id=$1 [L]
    LocaFY.in - The smartest way to find local information in India

  3. #3
    Platinum Lifetime Member
    csmaster2005's Avatar
    Join Date
    Jul 2004
    Location
    United States
    Posts
    456
    DNF$
    1,840
    Bank
    0
    Total DNF$
    1,840
    Donate  

    Re: mod_rewrite freaks ... I need your help!

    http://www.tutorialplace.com/search....l%20Categories has a good tutorial lol. sorry for repost but it is a helpful list
    Tyler Cruz schooled me in BW, so he won this until May 23rd, 2011 TylerCruz

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