Free Web Hosting Forum
(#1 (permalink))
Old
Junior Member
Austin9684 is on a distinguished road
 
Posts: 9
Join Date: Aug 2012
Default .htaccess not working - 08-02-2012, 06:58 PM

Hello all im a bit new to php and html coding and i just recently started a website for me a a few friends and im having some trouble with .htaccess

I have set up a website with a forum and a main page and the forums (phpbb) index page is names index.php and the main page (the one i want to show up by default) is called index.html . I have noticed that 000webhosting has priority for index.php over index.html so i looked up some stuff and i created an .htaccess file

this is what it looks like
Code:
RewriteBase /
DirectoryIndex index.html index.htm index.php
I have been trying to get this to work for a little under 2 days and i finally decided to post here it would be difficult to change the links on all 500+ pages of the forum so instead i thought that .htaccess file would be my best bet

Last edited by Austin9684; 08-02-2012 at 07:12 PM.
Reply With Quote
Sponsored Links
(#2 (permalink))
Old
ShocK's Avatar
Senior Member
ShocK is on a distinguished road
 
Posts: 4,117
Join Date: Jul 2011
Location: UK
Default 08-02-2012, 07:10 PM

Your home page and your forum home page are both called index.php?
Reply With Quote
(#3 (permalink))
Old
Junior Member
Austin9684 is on a distinguished road
 
Posts: 9
Join Date: Aug 2012
Default 08-02-2012, 07:11 PM

No, the main page is called index.html and the forum is called index.php
Reply With Quote
(#4 (permalink))
Old
ShocK's Avatar
Senior Member
ShocK is on a distinguished road
 
Posts: 4,117
Join Date: Jul 2011
Location: UK
Default 08-02-2012, 07:21 PM

I just tested this and it works no problem for me
Code:
RewriteBase /
DirectoryIndex index.html index.php
Are you sure it's not a cache problem?
Reply With Quote
(#5 (permalink))
Old
Junior Member
Austin9684 is on a distinguished road
 
Posts: 9
Join Date: Aug 2012
Default 08-02-2012, 07:28 PM

I tried with 3 different browsers and cleared my cache in all of them it just gives me the good old 404 error

http://error404.000webhost.com/


EDIT

I dont know if you need it or not, the like to my website is

survivalvortex.tk

Last edited by Austin9684; 08-02-2012 at 07:30 PM.
Reply With Quote
(#6 (permalink))
Old
ShocK's Avatar
Senior Member
ShocK is on a distinguished road
 
Posts: 4,117
Join Date: Jul 2011
Location: UK
Default 08-02-2012, 07:37 PM

I can't get to either index.html or index.php files on that URL, is that all that's in your .htaccess?
Reply With Quote
(#7 (permalink))
Old
Junior Member
Austin9684 is on a distinguished road
 
Posts: 9
Join Date: Aug 2012
Default 08-02-2012, 07:38 PM

Yes that is all that is in my .htaccess
Reply With Quote
(#8 (permalink))
Old
ShocK's Avatar
Senior Member
ShocK is on a distinguished road
 
Posts: 4,117
Join Date: Jul 2011
Location: UK
Default 08-02-2012, 07:48 PM

I can't get to any standard phpbb3 forum pages either, faq.php, ucp.php etc. Can you access any pages at all? Have you logged into members area? Any messages?
Reply With Quote
(#9 (permalink))
Old
Junior Member
Austin9684 is on a distinguished road
 
Posts: 9
Join Date: Aug 2012
Default 08-02-2012, 07:56 PM

when i have the .htaccess page up with only the 1st line "RewriteBase /" i can access all the pages by typing them in manualy but then when i add "DirectoryIndex index.html index.php" nothing works
Reply With Quote
(#10 (permalink))
Old
ShocK's Avatar
Senior Member
ShocK is on a distinguished road
 
Posts: 4,117
Join Date: Jul 2011
Location: UK
Default 08-02-2012, 08:03 PM

This is a standard .htaccess file for 000webhost with phpbb3 installed and one redirect to index.html (working)

Code:
#
# Uncomment the statement below if you want to make use of
# HTTP authentication and it does not already work.
# This could be required if you are for example using PHP via Apache CGI.
#
#<IfModule mod_rewrite.c>
#RewriteEngine on
#RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
#</IfModule>

<Files "config.php">
Order Allow,Deny
Deny from All
</Files>

<Files "common.php">
Order Allow,Deny
Deny from All
</Files>
DirectoryIndex index.html index.php
Reply With Quote
Reply

Tags
htaccess, html, php, phpbb

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.5.2
vBulletin Skin developed by: vBStyles.com