hello, I have a small doubt that I came while navigating a site
web, practically could see the other pages while
Having always a given page in url, I'll explain with a
example that is much clearer, www.site.it/homepage.php
displaying the front page of the site, but if I did www.site.it/homepage.php#/utenti.php
view list of users, I was wondering how I could
do such a thing in php? I raised this question? : D
thanks 17 1903 co*******@gmail.com wrote:
hello, I have a small doubt that I came while navigating a site
web, practically could see the other pages while
Having always a given page in url, I'll explain with a
example that is much clearer, www.site.it/homepage.php
displaying the front page of the site, but if I did www.site.it/homepage.php#/utenti.php
view list of users, I was wondering how I could
do such a thing in php? I raised this question? : D
thanks
You don't need PHP for this - it's straight html and possibly apache
configuration (mod_rewrite).
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp. js*******@attglobal.net
==================
On Tue, 16 Sep 2008 17:23:59 -0700, co*******@gmail.com wrote:
hello, I have a small doubt that I came while navigating a site web,
practically could see the other pages while Having always a given page
in url, I'll explain with a example that is much clearer, www.site.it/homepage.php displaying the front page of the site, but if I
did www.site.it/homepage.php#/utenti.php view list of users, I was
wondering how I could do such a thing in php? I raised this question? :
D
thanks
Say you have the page http://nl.php.net/manual/en/index.php. A request to http://nl.php.net/manual/en/index.php/any.file.name will also be served
by index.php. In this example, it does not change the page, but the PHP
file may parse the URL and decide to serve something else when the URL is
different.
Anybody knows what this feature is called or why this works like this?
Sjoerd wrote:
On Tue, 16 Sep 2008 17:23:59 -0700, co*******@gmail.com wrote:
>hello, I have a small doubt that I came while navigating a site web, practically could see the other pages while Having always a given page in url, I'll explain with a example that is much clearer, www.site.it/homepage.php displaying the front page of the site, but if I did www.site.it/homepage.php#/utenti.php view list of users, I was wondering how I could do such a thing in php? I raised this question? : D
thanks
Say you have the page http://nl.php.net/manual/en/index.php. A request to http://nl.php.net/manual/en/index.php/any.file.name will also be served
by index.php. In this example, it does not change the page, but the PHP
file may parse the URL and decide to serve something else when the URL is
different.
Anybody knows what this feature is called or why this works like this?
Yes, as Jerry says above that's apache's mod_rewrite module.
It's a system that uses regular expressions to pattern match and convert
the URLs you receive in a GET requests into the URLs you actually want.
You specify rewrite directives in you apache config file OR (for
individual users) in htaccess files.
By rewriting the URLS you can change paths into variables e.g.
You receive http://www.poo.poo/images/badgers
and mod_rewrite could change that into: http://www.poo.poo/imagescript.php?type=badgers
Thereby mapping paths to PHP scripts and variables.
The reference documentation is quite terrifying considering the simple
use cases most people have so I'm not sure I recommend reading and
regular expressions(regex) can take quite a while to get the hang of too
so be prepared to spend a few evenings mastering it! Some useful
examples can be found here: http://httpd.apache.org/docs/1.3/misc/rewriteguide.html
Roger Heathcote.
On 17 Set, 02:53, Jerry Stuckle <jstuck...@attglobal.netwrote:
cobra9...@gmail.com wrote:
hello, I have a small doubt that I came while navigating a site
web, practically could see the other pages while
Having always a given page in url, I'll explain with a
example that is much clearer,www.site.it/homepage.php
displaying the front page of the site, but if I didwww.site.it/homepage.php#/utenti.php
view list of users, I was wondering how I could
do such a thing in php? I raised this question? : D
thanks
You don't need PHP for this - it's straight html and possibly apache
configuration (mod_rewrite).
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attglobal.net
==================
ok thanks to all :)
Sherm Pendley wrote:
r0g <ai******@technicalbloke.comwrites:
>Actually he's right, although it sounds like mod rewrite I just tried:
http://www.php.net/downloads.php/test
and it served up exactly the same page as:
http://www.php.net/downloads.php
How odd.
Nothing odd about it at all. PATH_INFO has been around for as long as
CGI scripts have been.
>I'm guessing it's a PHP/apache thing
No, PATH_INFO predates both PHP and Apache.
So this behaviour happens even on apache without PHP then??
Roger.
r0g <ai******@technicalbloke.comwrites:
Sherm Pendley wrote:
>r0g <ai******@technicalbloke.comwrites:
>>Actually he's right, although it sounds like mod rewrite I just tried:
http://www.php.net/downloads.php/test
and it served up exactly the same page as:
http://www.php.net/downloads.php
How odd.
Nothing odd about it at all. PATH_INFO has been around for as long as CGI scripts have been.
>>I'm guessing it's a PHP/apache thing
No, PATH_INFO predates both PHP and Apache.
So this behaviour happens even on apache without PHP then??
Yes, of course. PATH_INFO is a standard CGI variable, available on any
server in any language:
<http://hoohoo.ncsa.uiuc.edu/cgi/env.html>
sherm--
--
My blog: http://shermspace.blogspot.com
Cocoa programming in Perl: http://camelbones.sourceforge.net
Sherm Pendley wrote:
r0g <ai******@technicalbloke.comwrites:
>Sherm Pendley wrote:
>>r0g <ai******@technicalbloke.comwrites:
Actually he's right, although it sounds like mod rewrite I just tried:
http://www.php.net/downloads.php/test
and it served up exactly the same page as:
http://www.php.net/downloads.php
How odd. Nothing odd about it at all. PATH_INFO has been around for as long as CGI scripts have been.
I'm guessing it's a PHP/apache thing No, PATH_INFO predates both PHP and Apache.
So this behaviour happens even on apache without PHP then??
Yes, of course. PATH_INFO is a standard CGI variable, available on any
server in any language:
<http://hoohoo.ncsa.uiuc.edu/cgi/env.html>
sherm--
"These environment variables are set when the server executes the
gateway program."
So, to clarify, when you have any scripting/CGI invoked by the URL the
server will eat the rest of the URL and give it to the script/CGI in
this PATH_INFO variable.
When it doesn't (i.e. plain .html files) it'll just throw a 404.
Is this correct?
Sorry if I sound naive but I want to make sure I'm understanding this
properly.
BTW: When I said 'apache without PHP' what I meant was 'apache with no
scripting running, CGI or otherwise'. My bad. I guess I should have been
clearer about that.
Thanks for the insight,
Roger.
r0g <ai******@technicalbloke.comwrites:
Sherm Pendley wrote:
>r0g <ai******@technicalbloke.comwrites:
>>So this behaviour happens even on apache without PHP then??
Yes, of course. PATH_INFO is a standard CGI variable, available on any server in any language:
<http://hoohoo.ncsa.uiuc.edu/cgi/env.html>
"These environment variables are set when the server executes the
gateway program."
So, to clarify, when you have any scripting/CGI invoked by the URL the
server will eat the rest of the URL and give it to the script/CGI in
this PATH_INFO variable.
Yes, exactly. Suppose you have a URL like this:
<http://foo.invalid/index.php/bar/baz/qux>
Now, supposing your base HTML directory is /home/html, when index.php
is executed the value of PATH_INFO will be '/bar/baz/qux', and that of
PATH_TRANSLATED will be '/home/html/bar/baz/qux'.
When it doesn't (i.e. plain .html files) it'll just throw a 404.
Is this correct?
Right. CGI variables aren't passed to static content, because there
would be no point in doing so - static content, by definition, would
not be able to use them anyway.
sherm--
--
My blog: http://shermspace.blogspot.com
Cocoa programming in Perl: http://camelbones.sourceforge.net
On 17 Set, 02:53, Jerry Stuckle <jstuck...@attglobal.netwrote:
cobra9...@gmail.com wrote:
hello, I have a small doubt that I came while navigating a site
web, practically could see the other pages while
Having always a given page in url, I'll explain with a
example that is much clearer,www.site.it/homepage.php
displaying the front page of the site, but if I didwww.site.it/homepage.php#/utenti.php
view list of users, I was wondering how I could
do such a thing in php? I raised this question? : D
thanks
You don't need PHP for this - it's straight html and possibly apache
configuration (mod_rewrite).
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attglobal.net
==================
but i have other request, how to i usa a char # in file htacces if is
comment ?
example on really site: http://www.new.facebook.com/home.php http://www.new.facebook.com/home.php#/notifications.php
ecc . . .
cobra90nj
On 17 Set, 02:53, Jerry Stuckle <jstuck...@attglobal.netwrote:
cobra9...@gmail.com wrote:
hello, I have a small doubt that I came while navigating a site
web, practically could see the other pages while
Having always a given page in url, I'll explain with a
example that is much clearer,www.site.it/homepage.php
displaying the front page of the site, but if I didwww.site.it/homepage.php#/utenti.php
view list of users, I was wondering how I could
do such a thing in php? I raised this question? : D
thanks
You don't need PHP for this - it's straight html and possibly apache
configuration (mod_rewrite).
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attglobal.net
==================
but i have other request, how to i use a char # in file htacces if is
comment ?
example on really site: http://www.new.facebook.com/home.php http://www.new.facebook.com/home.php#/notifications.php
ecc . . .
cobra90nj co*******@gmail.com wrote:
On 17 Set, 02:53, Jerry Stuckle <jstuck...@attglobal.netwrote:
>cobra9...@gmail.com wrote:
>>hello, I have a small doubt that I came while navigating a site web, practically could see the other pages while Having always a given page in url, I'll explain with a example that is much clearer,www.site.it/homepage.php displaying the front page of the site, but if I didwww.site.it/homepage.php#/utenti.php view list of users, I was wondering how I could do such a thing in php? I raised this question? : D thanks
You don't need PHP for this - it's straight html and possibly apache configuration (mod_rewrite).
-- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstuck...@attglobal.net ==================
but i have other request, how to i usa a char # in file htacces if is
comment ?
example on really site:
http://www.new.facebook.com/home.php
http://www.new.facebook.com/home.php#/notifications.php
ecc . . .
cobra90nj
Try alt.apache.configuration. This is NOT a PHP question.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp. js*******@attglobal.net
==================
..oO(co*******@gmail.com)
>but i have other request, how to i usa a char # in file htacces if is comment ?
The # separates the URL from the fragment identifier. The server will
never see it. If you want that char to appear in your URLs, you have to
encode it.
>example on really site:
http://www.new.facebook.com/home.php
http://www.new.facebook.com/home.php#/notifications.php
Technically it's the same URL. The latter just contains a (invalid)
fragment identifier, which is handled by the browser.
Micha
..oO(John Dunlop)
>Michael Fesser:
>http://www.new.facebook.com/home.php
>http://www.new.facebook.com/home.php#/notifications.php Technically it's the same URL. The latter just contains a (invalid) fragment identifier, which is handled by the browser.
RFC 3986 allows the fragment identifier </notifications.phpand HTML allows the (a element) name attribute value "/ notifications.php" (although the same value for the id attribute would be invalid).
Yes. See my reply in the other thread about the names on form controls.
Same thing.
Micha This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Reinhold Birkenfeld |
last post by:
Hello,
at the moment python-dev is discussing including Jason Orendorff's path module
into the standard library.
Do you have any other good and valued Python modules that you would think are...
|
by: qazmlp |
last post by:
I need to include a list of
- C++ headers
- headers of other modules
- headers of my module
- implementation specific ie.OS headers
In what order, they should be included in my .CPP file?...
|
by: Nathan Funk |
last post by:
I used to work as a web designer a couple of years ago, but I haven't
been closely in touch in the past years. Has anything changed recently
for managing content that is common among many pages...
|
by: Dave |
last post by:
Hello all,
To protect against multiple inclusions, it is standard practice to enclose
the contents of a header file in a construct like this:
#ifndef FOO_INCLUDED
#define FOO_INCLUDED
.......
|
by: techBoy |
last post by:
I am looking for a tool that can scan my soyrce code and check if a
header file gets included more then once in a sequece of compiled code.
Can some one guide me to such a tool !!
|
by: venkatbo |
last post by:
Hi folks,
I'd like to disable the inclusion of tk graphics lib in my py build.
Looked around but couldn't find a clear answer. Which one of
the following would I need to use in the configure...
|
by: vsgdp |
last post by:
I was looking at some library code today and noticed something like
this:
// sublibrary.h
// define some constants, enums, symbols
#include "componentA.h"
#include "componentB.h"
#include...
|
by: Juha Nieminen |
last post by:
Multiple inclusion of the same header file can cause the compilation
to fail because of multiple definitions of the same type. That's why
it's standard practice to write all headers like this:
...
|
by: RajinCodingForum |
last post by:
I have some idea but i am puzzled.
As i understand, file inclusion problems like x includes y and y in turn includes x etc. can be avoided by #ifdef preprocessor checks.
Can you please explain with...
|
by: =?Utf-8?B?UmljaEI=?= |
last post by:
I am trying to create a project using the ASP.NET AJAX accordion control. I
would like to dynamically add panes to the control with a form template added
when the pane is added. I have tried...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |