Need help in .HTACCESS (Virtual directories/files)

Discussion in 'Apache' started by silentkiller, May 26, 2006.

  1. #1
    Hello pple,

    DirectoryIndex index.php
    RewriteEngine on
    RewriteRule ^domain-name/ domain-name.php [L]
    RewriteRule ^domain-name/registration.html domain-name-registration.php [L]
    Options -Indexes
    Code (markup):
    Any idea how do I get my "domain-name/registration.html" working? It doesn't show up, it is being redirected to domain-name.php ..

    How should I write my .HTACCESS to have a virtual directory called "domain-name" with its index being "domain-name.php" and one of the virtual subpages "registration.html" pointed to domain-name-registration.php ? Please help!

    Thanks!
     
    silentkiller, May 26, 2006 IP
  2. emitind

    emitind Peon

    Messages:
    567
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I think the first rule is overwriting the second one as it's first. Try changing them around.

    DirectoryIndex index.php
    RewriteEngine on
    RewriteRule ^domain-name/registration.html domain-name-registration.php [L]
    RewriteRule ^domain-name/ domain-name.php [L]
    Options -Indexes
    Code (markup):
     
    emitind, May 26, 2006 IP
  3. silentkiller

    silentkiller Peon

    Messages:
    263
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I've tried that just now. Doesn't help. :(
     
    silentkiller, May 26, 2006 IP
  4. emitind

    emitind Peon

    Messages:
    567
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #4
    This should lay it out for you:

    http://forum.modrewrite.com/viewtopic.php?t=1443
     
    emitind, May 26, 2006 IP