SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member Leo1977's Avatar
    Join Date
    Jun 2004
    Location
    USA
    Posts
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Exclamation Change the default page from index.php to index.html

    Hello,

    I've tried all kinds of .htaccess modifications and nothing seems to work. I have VBSEO installed on my forum.

    I want to change the default opening page from index.php to index.htnl. Both files are in the root. My apache config is set to open index.html first but it looks like some settings in the .htaccess file override it.

    My .htaccess

    # Comment the following line (add '#' at the beginning)
    # to disable mod_rewrite functions.
    # Please note: you still need to disable the hack in
    # the vBSEO control panel to stop url rewrites.
    RewriteEngine On

    # Some servers require the Rewritebase directive to be
    # enabled (remove '#' at the beginning to activate)
    # Please note: when enabled, you must include the path
    # to your root vB folder (i.e. RewriteBase /forums)
    #RewriteBase /

    #RewriteCond %{HTTP_HOST} !^www\.yourdomain\.com
    #RewriteRule (.*) http://www.yourdomain.com/forums/$1 [L,R=301]

    RewriteRule ^((urllist|sitemap).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]

    RewriteCond %{REQUEST_FILENAME} -f
    RewriteCond %{REQUEST_FILENAME} (admincp|modcp|clientscript|cpstyles|images)/
    RewriteRule ^(.*)$ $1 [L]

    RewriteCond %{REQUEST_FILENAME}index\.php -f
    RewriteRule ^(.*)$ $1index.php [L]

    RewriteCond %{QUERY_STRING} !vbseourl=
    RewriteCond %{REQUEST_FILENAME} !chat
    RewriteRule ^(.*\.php)$ vbseo.php?vbseourl=$1&%{QUERY_STRING} [L]

    RewriteRule ^$ vbseo.php?vbseourl=index.php [L]
    RewriteRule ^(archive/.*)$ vbseo.php?vbseourl=$1&%{QUERY_STRING} [L]

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.+)$ vbseo.php?vbseourl=$1&%{QUERY_STRING} [L]


    Thanks

  2. #2
    ✯✯✯ silver trophybronze trophy php_daemon's Avatar
    Join Date
    Mar 2006
    Posts
    5,284
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Try setting:
    Code:
    DirectoryIndex index.html index.php
    Saul

  3. #3
    SitePoint Member Leo1977's Avatar
    Join Date
    Jun 2004
    Location
    USA
    Posts
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the reply but that did not work, because of the special mod_rewrite rules. I have tried it.

    The only solution I found for this is setting up a redirect page in Cpanel.

    Quote Originally Posted by php_daemon View Post
    Try setting:
    Code:
    DirectoryIndex index.html index.php


Bookmarks

Posting Permissions

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