1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

.htaccess rewrite

Discussion in 'Apache' started by seoindia, Sep 13, 2005.

  1. #1
    I am new to this field and i try to rewrite all my php files with html ones with following code

    Options +FollowSymlinks
    RewriteEngine on
    RewriteRule ^(.*)\.php $1.html [nc]

    But when i did that none of my php files are opening, they are going to not found. Pls help me to solve my problem.
     
    seoindia, Sep 13, 2005 IP
  2. Nintendo

    Nintendo ♬ King of da Wackos ♬

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

    To just change the file exstension of them.
     
    Nintendo, Sep 13, 2005 IP
  3. dct

    dct Finder of cool gadgets

    Messages:
    3,132
    Likes Received:
    328
    Best Answers:
    0
    Trophy Points:
    230
    #3
    Geez, It's only been 8 minutes

    To me it looks like you have it the opposite way round. Do you want the links to the outside world to have a php extension and then internally you treat them as html, if so er why?
     
    dct, Sep 13, 2005 IP