Modrewrite mypage.htm to /mypage/ - HELP

Discussion in 'Apache' started by lateuk, Nov 9, 2007.

  1. #1
    Hello,
    I am trying to change my site from using .htm files to directories so for example /adsense.htm would be /adsense/

    I have made the directory and renamed the adsense.htm to index.htm (in the directory of adsense).

    Now i wanted to do a modrewrite, so i added:

    RewriteRule ^adsense.htm /adsense/ [L,R=301]

    to the htaccess file. This does not work, any help would be much appriciated, i hate modrewrite stuff.

    Late
     
    lateuk, Nov 9, 2007 IP
  2. serialCoder

    serialCoder Guest

    Best Answers:
    0
    #2
    hi, I'm not really a mod rewrite expert but i know quite enough :cool:
    by the way, have you configured/enabled your server to allow mod rewrite?
     
    serialCoder, Nov 9, 2007 IP
  3. lateuk

    lateuk Active Member

    Messages:
    317
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    58
    #3
    I am using modrewrite to do a sitename.com to www.sitename.com redirect and this works, so a assume modrewrite is working on the server.
     
    lateuk, Nov 9, 2007 IP
  4. krt

    krt Well-Known Member

    Messages:
    829
    Likes Received:
    38
    Best Answers:
    0
    Trophy Points:
    120
    #4
    What happens? A 404/500 error, what is the location the browser ends up? Does it stay at domain.com/adsense.htm ?
     
    krt, Nov 9, 2007 IP
  5. lateuk

    lateuk Active Member

    Messages:
    317
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    58
    #5
    Just went to check your question and i find it is working correctly now!?!? Strange.

    Google currently lists that page as /adsense.htm so will it eventually change to /adsense/ in Google?

    Will it also not affect my page rank etc?

    Thanks
     
    lateuk, Nov 9, 2007 IP