unable to access html files on php website

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
techman23
Forum Newbie
Posts: 2
Joined: Wed Oct 06, 2010 1:40 pm

unable to access html files on php website

Post by techman23 »

Dear friends,
I am running a php website which I did not code myself http://gameparadise.byethost18.com. Whenever I upload an html file and try to open it a 404 error page is returned. Before I was unable to access xml files then I removed some entries in my .htaccess file which was restricting them but I don't know which entry should I delete from the .htaccess file in order to get access to html files.

It was not allowed to attach a txt file so i have attached the entries that are in my .htaccess file

This example html file cannot be accessed: http://gameparadise.byethost18.com/g...0462db9fc.html

Thanks in advance.

#############
# uncomment to up your php script memory limit
# this may be disabled on some servers.
# php_value memory_limit 24M
#############

Options +FollowSymLinks
RewriteEngine On

#############
#
# SEO Support
#
#############

#############
# SEO Test url
#############

RewriteRule ^test.(htm|html)/?$ /test/seo.php [L]

#############
# Download Game Views
#############
#default short
RewriteRule ^download.(htm|html)/?$ /download-games.php [L]
#default
RewriteRule ^download-games.(htm|html)/?$ /download-games.php [L]
# glrelease
RewriteRule ^new-download-games.(htm|html)/?$ /download-games.php?games=new-download [L]
# glrank
RewriteRule ^top-download-games.(htm|html)/?$ /download-games.php?games=top-download [L]

#############
# Download Game Views with Game type passed
#############
# glrelease with game type
RewriteRule ^new-(.*)-download-games.(htm|html)/?$ /download-games.php?games=new-download&gtype=$1 [L]
# glrank with game type
RewriteRule ^top-(.*)-download-games.(htm|html)/?$ /download-games.php?games=top-download&gtype=$1 [L]

#############
# ALT Download Genre Game Rules
#############
# genre with game type
RewriteRule ^download-(.*)-(.*)-games.(htm|html)/?$ /download-games.php?games=$2&gtype=$1 [L]
# genre with system default game type
RewriteRule ^download-(.*)-games.(htm|html)/?$ /download-games.php?games=$1 [L]

#############
# Online Game Views
#############
#default short
RewriteRule ^online.(htm|html)$ /online-games.php
#default
RewriteRule ^online-games.(htm|html)/?$ /online-games.php [L]

#############
# Online Genre Game Views
#############
RewriteRule ^(.*)-online-games.(htm|html)/?$ /online-games.php?games=$1 [L]
RewriteRule ^online-(.*)-games.(htm|html)/?$ /online-games.php?games=$1 [L]

#############
# Download Genre Game Fallback Views
#############

RewriteRule ^(.*)-games.(htm|html)/?$ /download-games.php?games=$1 [L]

#############
# browse with local and gametype passed
# http://sgs.lan/browse-all-rank-desc-0-10-en-pc.html
# http://sgs.lan/browse.php?genre=all&sor ... n&gtype=pc
#############

RewriteRule browse-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)\.(htm|html)$ /browse.php?genre=$1&sort=$2&order=$3&from=$4&view=$5&local=$6&gtype=$7

#############
# browse with view passed no local or gametype
# http://sgs.lan/browse-all-rank-desc-0-10.html
# http://sgs.lan/browse.php?genre=all&sor ... =0&view=50
#############

RewriteRule browse-(.*)-(.*)-(.*)-(.*)-(.*)\.(htm|html)$ /browse.php?genre=$1&sort=$2&order=$3&from=$4&view=$5

#############
# browse basic params
# http://sgs.lan/browse-all-rank-desc-0.html
# http://sgs.lan/browse.php?genre=all&sor ... esc&from=0
#############

RewriteRule browse-(.*)-(.*)-(.*)-(.*)\.(htm|html)$ /browse.php?genre=$1&sort=$2&order=$3&from=$4

#############
# browse no params
# http://sgs.lan/browse.html
# http://sgs.lan/browse.php
#############

RewriteRule browse.(htm|html)$ /browse.php
#############
# search fom 0 or more and view
# http://sgs.lan/search-term-0.html
#############

RewriteRule search-(.*)-(.*)-(.*)-(.*)\.(htm|html)$ /search.php?search=$1&gtype=$2&from=$3&view=$4

#############
# search fom 0 or more and view
# http://sgs.lan/search-term-0.html
#############

RewriteRule search-(.*)-(.*)-(.*)\.(htm|html)$ /search.php?search=$1&from=$2&view=$3

#############
# search from 0 or more
# http://sgs.lan/search-term-0.html
#############

RewriteRule search-(.*)-(.*)\.(htm|html)$ /search.php?search=$1&from=$2

#############
# search from 0
# http://sgs.lan/search-term.html
#############

RewriteRule search-(.*)\.(htm|html)$ /search.php?search=$1


#############
# search default
# http://sgs.lan/search.html
#############

RewriteRule search.(htm|html)$ /search.php

#############
# search from 0
# http://sgs.lan/search-term.html
#############

RewriteRule search(.*)\.(htm|html)$ /search.php?search=$1

#############
# gameinfo with local and altversion request
# http://sgs.lan/game_id_game-foldername_local_gtype.html
#############

RewriteRule ^game_(.*)_(.*)_(.*)_(.*)\.(htm|html)$ /gameinfo.php?id=$1&foldername=$2&local=$3&gtype=$4

#############
# gameinfo default request
# http://sgs.lan/game_id_game-foldername.html
#############

RewriteRule ^game_(.*)_(.*)\.(htm|html)$ /gameinfo.php?id=$1

#############
# Download url
#############

RewriteRule ^download_(.*)_(.*)\.(htm|html)$ /request.php?type=download&gameid=$1&gtype=$2

#############
# Buy url
#############

RewriteRule ^buy_(.*)_(.*)\.(htm|html)$ /request.php?type=buy&gameid=$1&gtype=$2

#############
# Online Games
# http://sgs.lan/online-games.html
#############

RewriteRule ^online-games.(htm|html)$ /online.php

#############
#Online Play
# http://sgs.lan/play_id_foldername.html
#############

RewriteRule ^play_(.*)_(.*)\.(htm|html)$ /play.php?id=$1

#############
# login page
#############

RewriteRule ^login.(htm|html)/?$ /login.php [NC]

#############
# search page
#############

RewriteRule ^search_(.*).(htm|html)/?$ /search.php?search=$1 [NC]

#############
# sitemap page
#############

RewriteRule ^sitemap.(htm|html)/?$ /sitemap.php [NC]

#############
# tags / tagcloud
#############

RewriteRule ^tags.(htm|html)/?$ /tags.php [NC]
RewriteRule ^tagcloud.(htm|html)/?$ /tags.php [NC]

#############
# RSS / RSS Feed
#############

RewriteRule rss/(.*)-(.*).(xml)/?$ /modules/rss/rss.php?feed=$1&local=$2

#############
# custom pages with local passed
# http://sgs.lan/filename-local.html
#############

RewriteRule ^(.+)-(.*).(htm|html)/?$ /page.php?id=$1&tmplocal=$2 [NC]

#############
# custom pages
# http://sgs.lan/filename.html
#############

RewriteRule ^(.+).(htm|html)/?$ /page.php?id=$1 [NC]

#############
# Error document redirects
#############

ErrorDocument 400 /error.php?400
ErrorDocument 401 /error.php?401
ErrorDocument 403 /error.php?403
ErrorDocument 404 /error.php?404
ErrorDocument 500 /error.php?500


#############
# block requests for the following files
#############
User avatar
twinedev
Forum Regular
Posts: 984
Joined: Tue Sep 28, 2010 11:41 am
Location: Columbus, Ohio

Re: unable to access html files on php website

Post by twinedev »

Well it is not simply a case of deleting a line, but instead putting a condition on this line:

[syntax]RewriteRule ^(.+).(htm|html)/?$ /page.php?id=$1 [NC][/syntax]

I don't have it offhand, but you'd want to put a condition before that that basically says "if what I'm calling isn't an actual file, do the next rule"

This way when you call directly to the file, it will not use it (which is what you are getting now)

-Greg
techman23
Forum Newbie
Posts: 2
Joined: Wed Oct 06, 2010 1:40 pm

Re: unable to access html files on php website

Post by techman23 »

I added the code which you had written, into my .htacess file but the problem is still the same

Any more ideas?
Post Reply