473,500 Members | 1,748 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Question on php questionmark variables but slash instead

Hello.

I've noticed in MediaWiki (the software used by Wikipedia.org) uses
forward-slashes "/" some of the time to organize the different items.

example

http://www.zeldarealm.com/zeldapedia....php/Main_Page

notice the

index.php/Main_Page

it uses a slash, rather than a question mark.

can someone please show me how to do this myself? It'd be appreciated

thanks

May 2 '06 #1
7 5042
Rik
ps**********@gmail.com wrote:
Hello.

I've noticed in MediaWiki (the software used by Wikipedia.org) uses
forward-slashes "/" some of the time to organize the different items.

example

http://www.zeldarealm.com/zeldapedia....php/Main_Page

notice the

index.php/Main_Page

it uses a slash, rather than a question mark.

can someone please show me how to do this myself? It'd be appreciated


Easiest are RewriteRules in .htaccess files.

Grtz,
--
Rik Wasmus
May 2 '06 #2
ps**********@gmail.com wrote:
notice the

index.php/Main_Page

it uses a slash, rather than a question mark.

can someone please show me how to do this myself? It'd be appreciated


You can parse the $_SERVER['REQUEST_URI'] variable and, per example, parse
it as follows:

$arg = substr(
$_SERVER['REQUEST_URI'],
1 + strrpos($_SERVER['REQUEST_URI'], '/')
);
JW
May 2 '06 #3
On Tue, 02 May 2006 11:55:04 -0700, pspauthority wrote:
Hello.

I've noticed in MediaWiki (the software used by Wikipedia.org) uses
forward-slashes "/" some of the time to organize the different items.

example

http://www.zeldarealm.com/zeldapedia....php/Main_Page

notice the

index.php/Main_Page

it uses a slash, rather than a question mark.

can someone please show me how to do this myself? It'd be appreciated


The answer other people seem to have missed is that $_SERVER["PATH_INFO"]
will be filled with /Main_Page on Apache servers.

Cheers,
Andy

--
Andy Jeffries MBCS CITP ZCE | gPHPEdit Lead Developer
http://www.gphpedit.org | PHP editor for Gnome 2
http://www.andyjeffries.co.uk | Personal site and photos

May 2 '06 #4
Andy Jeffries wrote:
The answer other people seem to have missed is that $_SERVER["PATH_INFO"]
will be filled with /Main_Page on Apache servers.


In case there is any doubt, this is the way to go.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

May 3 '06 #5
On Wed, 03 May 2006 09:07:08 +0100, Toby Inkster wrote:
The answer other people seem to have missed is that
$_SERVER["PATH_INFO"] will be filled with /Main_Page on Apache servers.


In case there is any doubt, this is the way to go.

--
Toby A Inkster BSc (Hons) ARCS


Just out of interest what does ARCS stand for?

Cheers,
Andy
--
Andy Jeffries MBCS CITP ZCE | gPHPEdit Lead Developer
http://www.gphpedit.org | PHP editor for Gnome 2
http://www.andyjeffries.co.uk | Personal site and photos

May 3 '06 #6
Andy Jeffries wrote:
Just out of interest what does ARCS stand for?


Associate of the Royal College of Science.
http://en.wikipedia.org/wiki/Royal_College_of_Science

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

May 6 '06 #7
On Sat, 06 May 2006 02:02:21 +0100, Toby Inkster wrote:
Just out of interest what does ARCS stand for?


Associate of the Royal College of Science.
http://en.wikipedia.org/wiki/Royal_College_of_Science


OK, thanks mate (and thanks for the link too).

Just nosey...

Cheers,
Andy
--
Andy Jeffries MBCS CITP ZCE | gPHPEdit Lead Developer
http://www.gphpedit.org | PHP editor for Gnome 2
http://www.andyjeffries.co.uk | Personal site and photos

May 7 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2513
by: Xaradas | last post by:
Someone could tell me why preg_replace eat a slash when it do replacement? <? $stringToReplace = "blah blah {nome} blah blah"; $replacement = "Two slash: \\\\"; $stringToReplace =...
30
74816
by: Stephen Ferg | last post by:
I have a question that is not directly Python-related. But I thought I'd ask the most erudite group that I know... :-) When did Windows start accepting the forward slash as a path separator...
1
1771
by: Victor Porton | last post by:
What can be and what should be xml:base attribute? Should/can it end with a slash? What to do if it doesn't end with a slash? If xml:base="http://xxx.org/aaa/" anything is clear. But what if...
1
1613
by: Kevin Blount | last post by:
Background: My script is designed to only allow the downloading of a file if a cookie exists to say that someone is logged into my companies site. A colleague set up a test area the extension...
8
1430
by: Just Me | last post by:
With VB6 I wanted to be consistent in how I named variables so I developed the following doc. The last column is what I named the variable. I tried to be consistent wit the Win32 document but it...
4
20836
by: Paw Pedersen | last post by:
When using Encoding.Convert to convert from UTF-8 to ISO646-US the special Chars like ÆØÅ are replaced with a questionmark (?). Is there any other way to convert between encodings where you can set...
4
312
by: pedrito | last post by:
I have a regex question and it never occurred to me to ask here, until I saw Jesse Houwing's quick response to Phil for his Regex question. I have some filenames that I'm trying to parse out of...
5
2079
by: DavidPr | last post by:
I'm using sessions now but I've just realized a potential problem. It's a small job board and the employers have to register and login to post ads, and the job seekers have to register, login and...
2
2818
by: Ilya | last post by:
Hi, all! Some weird thing happens... I'm trying to create a shortcut programmatically in C#. I need to create a shortcut with the "target" parameter using slash. Actually I'm creating a...
0
7136
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7232
jinu1996
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...
1
6906
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5490
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4923
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4611
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3110
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1430
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
316
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.