The page cannot be found!

Discuss everything related to PHP Hotel Site. All versions. Any questions related to the PHP Hotel Site developing or using should be posted to this forum.

Moderators: ne_moj, zewa

TimNHocking
Newbie
Newbie
Posts: 3
Joined: May 15th, '17, 20:43

The page cannot be found!

Postby TimNHocking » May 16th, '17, 00:15

If I try to access a link on my home page http://hockinghillsinnandcoffeeemporium.com I get:

The page cannot be found!
The page you have requested cannot be found on this server.

I would imagine I've changed something but don't know what.

ne_moj
Master
Master
Posts: 243
Joined: Jan 1st, '16, 14:11

Re: The page cannot be found!

Postby ne_moj » May 16th, '17, 02:09

Hello TimNHocking

The problem still exists? I see the homepage.

TimNHocking
Newbie
Newbie
Posts: 3
Joined: May 15th, '17, 20:43

Re: The page cannot be found!

Postby TimNHocking » May 16th, '17, 10:42

Yes. The home page seems OK but if you click on a button such as Rooms, Gallery, ect. it cannot find the page.

ne_moj
Master
Master
Posts: 243
Joined: Jan 1st, '16, 14:11

Re: The page cannot be found!

Postby ne_moj » May 17th, '17, 05:02

Check if the .htaccess file exists, if it exists, check the mod_rewrite module is enabled on the server. If mod_rewrite is enabled, there may be a problem with the .htaccess file, check if there are entries in this file

Code: Select all

########## Begin - SEO Links Section
## If you works with SEO links option uncomment the operations listed below
## redirection on pages
#
    RewriteRule ^pages/([0-9]+)/(.*).html$ index.php?page=pages&pid=$1 [L]
    RewriteRule ^pages/(.*).html$ index.php?page=pages&system_page=$1 [L]
    RewriteRule ^news/([0-9]+)/(.*).html$ index.php?page=news&nid=$1 [L]
    RewriteRule ^news/(.*).html$ index.php?page=news [L]
    RewriteRule ^hotels/([0-9]+)/(.*).html$ index.php?page=hotels&hid=$1 [L]
    RewriteRule ^rooms/([0-9]+)/(.*).html$ index.php?page=rooms&room_id=$1 [L]

    ## redirect for language
    RewriteRule ^([a-zA-Z][a-zA-Z])/index.php$ index.php?lang=$1 [L]
    RewriteRule ^([a-zA-Z][a-zA-Z])/?$ index.php?lang=$1 [L]
    RewriteRule ^([a-zA-Z][a-zA-Z])/pages/([0-9]+)/(.*).html$ index.php?page=pages&pid=$2&lang=$1 [L]
    RewriteRule ^([a-zA-Z][a-zA-Z])/pages/(.*).html$ index.php?page=pages&system_page=$2&lang=$1 [L]
    RewriteRule ^([a-zA-Z][a-zA-Z])/news/([0-9]+)/(.*).html$ index.php?page=news&nid=$2&lang=$1 [L]
   RewriteRule ^([a-zA-Z][a-zA-Z])/hotels/([0-9]+)/(.*).html$ index.php?page=hotels&hid=$2&lang=$1 [L]
    RewriteRule ^([a-zA-Z][a-zA-Z])/rooms/([0-9]+)/(.*).html$ index.php?page=rooms&room_id=$2&lang=$1 [L]
   
    ## redirect for currency
    RewriteRule ^([a-zA-Z][a-zA-Z][a-zA-Z])/index.php$ index.php?currency=$1 [L]
    RewriteRule ^([a-zA-Z][a-zA-Z][a-zA-Z])/?$ index.php?currency=$1 [L]
    RewriteRule ^([a-zA-Z][a-zA-Z][a-zA-Z])/pages/([0-9]+)/(.*).html$ index.php?page=pages&pid=$2&currency=$1 [L]
    RewriteRule ^([a-zA-Z][a-zA-Z][a-zA-Z])/pages/(.*).html$ index.php?page=pages&system_page=$2&currency=$1 [L]
    RewriteRule ^([a-zA-Z][a-zA-Z][a-zA-Z])/news/([0-9]+)/(.*).html$ index.php?page=news&nid=$2&currency=$1 [L]
   RewriteRule ^([a-zA-Z][a-zA-Z][a-zA-Z])/hotels/([0-9]+)/(.*).html$ index.php?page=hotels&hid=$2&currency=$1 [L]
    RewriteRule ^([a-zA-Z][a-zA-Z][a-zA-Z])/rooms/([0-9]+)/(.*).html$ index.php?page=rooms&room_id=$2&currency=$1 [L]
   
#
########## End - SEO Links Section

TimNHocking
Newbie
Newbie
Posts: 3
Joined: May 15th, '17, 20:43

Re: The page cannot be found!

Postby TimNHocking » May 17th, '17, 16:44

Thank you for your help. After contacting the hosting service this is their response:

We've resolved the problem with your app by inserting the following code into your .htaccess file:

RewriteBase /

It works fine now.
Thanks


Return to “ApPHP HotelSite / uHotelBooking Talk {developers/users}”