Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Feb 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    simple mod_rewrite not working.

    Hello everyone,

    I have been at it for two days and read apache doc, threads here and many postings . I am on a shared host and don't have access to server log/error files.

    All I am trying to do is to execute test.php when someone types www.mydomain.com/wm

    I have simple .htaccess setup in wm. wm is under public_html

    RewriteEngine On
    RewriteRule ^wm(/)?$ test.php [NC,L]

    I get internal server error. What am I doing wrong.Any insight would be greatly appreciated.

    Thanks.
    Alex

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,849
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    I get internal server error. What am I doing wrong.Any insight would be greatly appreciated.
    Are you sure that mod_rewrite module is On in your server? You may get some clues by checking the error_log
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    New to the CF scene
    Join Date
    Feb 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for the reply.

    mod_rewrite was on. I got it working by changing the rule to:
    RewriteRule ^(.*)$ test.php [NC,L]

    My .htaccess was under directory wm, and I am concluding that rewriterule starts matching pattern on the data that exists after the directory path in which .htaccess resides.


  •  

    Posting Permissions

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