mod_rewrite testing problem!! Please help!!

Discussion in 'Apache' started by best-p4u, Dec 26, 2005.

  1. #1
    I am setting my new Apache server.

    However, it has the mod_rewirte prolbem. Please help me!!!

    The httpd.conf file's config

    <VirtualHost ip:80>
    DocumentRoot /home/user/public_html
    ServerName www.domain.com

    RewriteEngine On
    RewriteLog "/home/user/public_html/rewrite.log"
    RewriteLogLevel 9

    <Directory "/home/user/public_html">
    AllowOverride ALL

    </Directory>
    </VirtualHost>



    The .htaccess in /home/user/public_html

    Options +FollowSymLinks
    Options +Indexes

    RewriteRule test.html test2.html [L]


    The test.html will show "No working"
    The tes2.html will show "working"

    Every time I access test.html, it will show "No working"

    What is the prolbem??
     
    best-p4u, Dec 26, 2005 IP
  2. noppid

    noppid gunnin' for the quota

    Messages:
    4,246
    Likes Received:
    232
    Best Answers:
    0
    Trophy Points:
    135
    #2
    maybe turn it on?

    RewriteEngine on
    RewriteRule test.html test2.html [L]
     
    noppid, Dec 26, 2005 IP
  3. best-p4u

    best-p4u Peon

    Messages:
    229
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks for your reply.

    Doesn't it work if I put RewriteEngine on <VirtualHost> ??
     
    best-p4u, Dec 26, 2005 IP
  4. noppid

    noppid gunnin' for the quota

    Messages:
    4,246
    Likes Received:
    232
    Best Answers:
    0
    Trophy Points:
    135
    #4
    I'm talking in the .htaccess file, not httpd.conf.
     
    noppid, Dec 26, 2005 IP
  5. best-p4u

    best-p4u Peon

    Messages:
    229
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Sure ^^

    Try it already..

    Still don't work...

    =.=
     
    best-p4u, Dec 26, 2005 IP
  6. noppid

    noppid gunnin' for the quota

    Messages:
    4,246
    Likes Received:
    232
    Best Answers:
    0
    Trophy Points:
    135
    #6
    Sorry, that was the only thing obvious to me. I'm not sure at all regarding the httpd.conf off hand.
     
    noppid, Dec 26, 2005 IP
  7. best-p4u

    best-p4u Peon

    Messages:
    229
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #7
    It doesn't matter.

    You are very helpful^^

    Have a nice day
     
    best-p4u, Dec 26, 2005 IP
    noppid likes this.
  8. noppid

    noppid gunnin' for the quota

    Messages:
    4,246
    Likes Received:
    232
    Best Answers:
    0
    Trophy Points:
    135
    #8
    Again, I dunno about the hpppd.conf. But, what if ya inculde the folder?

    RewriteEngine on
    RewriteBase /
    RewriteRule test.html test2.html [L]

    This means the file is in the root folder. I'm not a mod-rewrite expert by any means, but have pulled a few off.
     
    noppid, Dec 26, 2005 IP
  9. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #9
    Options +Indexes
    Options +FollowSymlinks
    RewriteEngine on
    RewriteBase /
    RewriteRule ^test\.html$ test2.html [L]

    test.html being the fake URL and test2.html being the real URL.
     
    Nintendo, Dec 26, 2005 IP
  10. best-p4u

    best-p4u Peon

    Messages:
    229
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Thanks all your replies.

    I will try them soon.

    :)
     
    best-p4u, Dec 26, 2005 IP