Author Topic: 404 Not Found  (Read 1506 times)

0 Members and 1 Guest are viewing this topic.

Offline jonnyj771

  • Senior Contributor
  • ****
  • Posts: 220
    • Lightning Weather
404 Not Found
« on: June 26, 2013, 11:37:45 PM »
I hope I am putting this in the correct forum string...If not, please put it in the right string and let me know. Thanks.

I have researched all aspects that I can find, looking at other websites and using search engines with no luck.
I am trying to get it set so when someone goes to a certain page on my site, they don't have to add the .php extension.
For example, when you go to lightningweather.com/wxforecast you will get a 404 Not Found "Forbidden" error unless you add the .php extension. :-k
I know this has something to do with either php.ini or .htaccess. I just cannot figure out what parameters I need to get this working.   ](*,)

Any help would be appreciated.
Facebook:
Lightning Weather
   www.facebook.com/lightningweather
                             /groups/lightningweather
Lightning Weather Quad Cities
                             /lightningwxqc
                             /groups/lightningWXQC
Weather Station Hardware: Davis Vantage Pro2 6152
Weather Station Software: WD - 10.37S Build XXX (Beta)
Page Template: MeteoTemplate v1x. (Current Active)

Offline JohnN

  • Forecaster
  • *****
  • Posts: 348
    • Monmouth County Weather
Re: 404 Not Found
« Reply #1 on: June 27, 2013, 10:14:51 AM »
*Note I don't know much about internet stuff, so I may not be using the right terms and such.
As far as I know, that's not possible. lightningweather.com/wxforecast is a directory, which is like a folder on your computer. lightningweather.com/wxforecast.php is the actual page, like a specific file on your computer. If there is some way to do what you want, I would be interested in finding it out, but like I said, I don't think it's possible.
www.monmouthcountyweather.comUK Met Office: 45560463
Twitter: @John_N_WxCoCoRaHS: NJ-MN-64
CWOP: E1682Davis Vantage Vue, Pro2Plus w/24 hr FARS, Ambient Weather WS-1000
PWS/WFY: SOUTHARDNJCumulusMX
Wunderground: KNJHOWEL11
                       KNJHOWEL15
LiveATC: KWRI/KNEL/New York Center
             KMJX/KBLM/3N6/N12

Offline Bushman

  • Forecaster
  • *****
  • Posts: 7549
    • Eagle Bay Weather
Need low cost IP monitoring?  http://wirelesstag.net/wta.aspx?link=NisJxz6FhUa4V67/cwCRWA or PM me for 50% off Wirelesstags!!

Offline JohnN

  • Forecaster
  • *****
  • Posts: 348
    • Monmouth County Weather
Re: 404 Not Found
« Reply #3 on: June 27, 2013, 10:43:29 AM »
I don't think that is what the original poster is asking to do. I think they want lightningweather.com/wxforecast (with no extension) to redirect to lightningweather.com/wxforecast.php. Then again I don't understand most of the stuff on that page, so maybe it does say how to do that in there.
www.monmouthcountyweather.comUK Met Office: 45560463
Twitter: @John_N_WxCoCoRaHS: NJ-MN-64
CWOP: E1682Davis Vantage Vue, Pro2Plus w/24 hr FARS, Ambient Weather WS-1000
PWS/WFY: SOUTHARDNJCumulusMX
Wunderground: KNJHOWEL11
                       KNJHOWEL15
LiveATC: KWRI/KNEL/New York Center
             KMJX/KBLM/3N6/N12

Offline Bushman

  • Forecaster
  • *****
  • Posts: 7549
    • Eagle Bay Weather
Re: 404 Not Found
« Reply #4 on: June 27, 2013, 11:29:18 AM »
The default for any directory is index.htm/hmtl - SO....  as long as that file is there (index) it can be redirected to whatever .php page the OP desires.  Or use one of the other options as shown in that link I posted.
Need low cost IP monitoring?  http://wirelesstag.net/wta.aspx?link=NisJxz6FhUa4V67/cwCRWA or PM me for 50% off Wirelesstags!!

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9297
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: 404 Not Found
« Reply #5 on: June 27, 2013, 11:49:08 AM »
The naming convention for a Uniform Resource Identifier (URI see http://tools.ietf.org/html/rfc3986 ) has been set quite a while ago, and what you're asking is somewhat contrary to the established conventions.  While it is technically feasible to do what you want (make what looks like a directory/path specification to be interpreted as a specific file[page] specification), I would advise against it as it is not conforming to the existing standards of usage.  The extension (.php) is used by the webserver to force processing of the page through the current associated PHP interpreter before returning it to the browser.  The .htm/.html/.txt pages are just returned to the browser without further processing.

While it is correct that webservers can be set up to return the default page (normally index.html or index.php if specified) when a URI specifies a directory and will return a listing of the directory contents -- this is normally suppressed for security reasons on most websites.

So, short form:

 what you are asking for is possible, but not recommended as it does not meet current web access standards.

Best regards,
Ken
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline jonnyj771

  • Senior Contributor
  • ****
  • Posts: 220
    • Lightning Weather
Re: 404 Not Found
« Reply #6 on: June 27, 2013, 06:23:24 PM »
Ok, Ken, just to make sure I understand what you are saying...
It is possible to have lightningweather.com/wxforecast redirect to lightningweather.com/wxforecast.php. But for security purposes, This manner is not recommended?

Facebook:
Lightning Weather
   www.facebook.com/lightningweather
                             /groups/lightningweather
Lightning Weather Quad Cities
                             /lightningwxqc
                             /groups/lightningWXQC
Weather Station Hardware: Davis Vantage Pro2 6152
Weather Station Software: WD - 10.37S Build XXX (Beta)
Page Template: MeteoTemplate v1x. (Current Active)

Offline Bushman

  • Forecaster
  • *****
  • Posts: 7549
    • Eagle Bay Weather
Re: 404 Not Found
« Reply #7 on: June 27, 2013, 07:11:07 PM »
Ok, Ken, just to make sure I understand what you are saying...
It is possible to have lightningweather.com/wxforecast redirect to lightningweather.com/wxforecast.php. But for security purposes, This manner is not recommended?



that is exactly what he (Ken) said.  Why not use a subdomain like forecast.lightningweather.com ?  I for instance, use webcam.eaglebayweather.com for direct access to the webcam.
Need low cost IP monitoring?  http://wirelesstag.net/wta.aspx?link=NisJxz6FhUa4V67/cwCRWA or PM me for 50% off Wirelesstags!!

 

anything