Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to avoid display of filename in URL

0 views
Skip to first unread message

RAZZ

unread,
Feb 21, 2008, 11:59:18 PM2/21/08
to
Hi,

When I login to my site initially it load index.php by default. We
can't see the page name index.php displayed in URL.

But when I click to some link on this page it will display the whole
path with file name on address bar and URL. I need that it should not
display my php files names on address bar and URL, how should I
achieve it?

AnrDaemon

unread,
Feb 22, 2008, 1:25:31 AM2/22/08
to
Greetings, RAZZ.
In reply to Your message dated Friday, February 22, 2008, 07:59:18,

Don't write links containing file names. But what is Your PHP question?


--
Sincerely Yours, AnrDaemon <anrd...@freemail.ru>

rf

unread,
Feb 22, 2008, 2:31:01 AM2/22/08
to

"AnrDaemon" <anrd...@freemail.ru> wrote in message
news:215861099.20...@freemail.ru...

For that matter what is the Javascript question?

--
Richard.


DS

unread,
Feb 22, 2008, 5:18:32 AM2/22/08
to
LOL. This is really an Apache question.

rf

unread,
Feb 22, 2008, 5:36:33 AM2/22/08
to

"DS" <d...@bigpond.net> wrote in message
news:13rt8bo...@corp.supernews.com...

> LOL. This is really an Apache question.

Or perhaps HTML.


rf

unread,
Feb 22, 2008, 5:36:56 AM2/22/08
to

"DS" <d...@bigpond.net> wrote in message
news:13rt8bo...@corp.supernews.com...
> LOL. This is really an Apache question.

Or perhaps IIS.


Gene Kelley

unread,
Feb 22, 2008, 10:11:31 AM2/22/08
to


Your problem is complex, your description vague. But, IF are running
Apache web server, a possible solution for you might be to look into
Apache's mod_rewrite extension that would give you a rule-based
rewriting engine to rewrite requested URLs on the fly.

HTH...

--

Gene Kelley
IT Consultant
Web Site Design & Development
Computer Network & System Administration
Villa Ridge, Missouri

Betikci Boris

unread,
Feb 22, 2008, 12:09:05 PM2/22/08
to

<a href="http://www.myphpsite.com/?id=12345">Visit This part of My
Site</a>

This link returns the id of 12345 to the index.php or whatever...

you can see that on youtube.com watch?v=LllLLllLLL watch.php?v=...

with fwslash goes to index.php without slash goes to *.php

Thomas 'PointedEars' Lahn

unread,
Feb 23, 2008, 8:45:33 PM2/23/08
to
DS wrote:
> LOL. This is really an Apache question.

Not at all. Although not only the OP failed to recognize that, it is about
how URI references work as the OP already has the index document of their
Web server configured properly. Read RFC 3986.


F'up2 cl.php

PointedEars
--
Prototype.js was written by people who don't know javascript for people
who don't know javascript. People who don't know javascript are not
the best source of advice on designing systems that use javascript.
-- Richard Cornford, cljs, <f806at$ail$1$8300...@news.demon.co.uk>

Thomas 'PointedEars' Lahn

unread,
Feb 23, 2008, 8:47:50 PM2/23/08
to
Gene Kelley wrote:

> RAZZ wrote:
>> When I login to my site initially it load index.php by default. We
>> can't see the page name index.php displayed in URL.
>>
>> But when I click to some link on this page it will display the whole
>> path with file name on address bar and URL. I need that it should not
>> display my php files names on address bar and URL, how should I achieve
>> it?
>
> Your problem is complex, your description vague.

Nonsense. It could not be simpler and the description of it could not be
more clear.

> But, IF are running Apache web server, a possible solution for you might
> be to look into Apache's mod_rewrite extension that would give you a
> rule-based rewriting engine to rewrite requested URLs on the fly.

Break, fly, wheel.


F'up2 cl.php

PointedEars
--
var bugRiddenCrashPronePieceOfJunk = (
navigator.userAgent.indexOf('MSIE 5') != -1
&& navigator.userAgent.indexOf('Mac') != -1
) // Plone, register_function.js:16

Jerry Stuckle

unread,
Feb 23, 2008, 9:28:32 PM2/23/08
to
Thomas 'PointedEars' Lahn wrote:
> DS wrote:
>> LOL. This is really an Apache question.
>
> Not at all. Although not only the OP failed to recognize that, it is about
> how URI references work as the OP already has the index document of their
> Web server configured properly. Read RFC 3986.
>
>
> F'up2 cl.php
>
> PointedEars

This has absolutely nothing to do with PHP. If it isn't Apache, then it
must be javascript. PHP has nothing at all to do with the URL processing.

fup'd back to c.l.javascript

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstu...@attglobal.net
==================

Jerry Stuckle

unread,
Feb 23, 2008, 9:29:45 PM2/23/08
to
Thomas 'PointedEars' Lahn wrote:
> Gene Kelley wrote:
>> RAZZ wrote:
>>> When I login to my site initially it load index.php by default. We
>>> can't see the page name index.php displayed in URL.
>>>
>>> But when I click to some link on this page it will display the whole
>>> path with file name on address bar and URL. I need that it should not
>>> display my php files names on address bar and URL, how should I achieve
>>> it?
>> Your problem is complex, your description vague.
>
> Nonsense. It could not be simpler and the description of it could not be
> more clear.
>
>> But, IF are running Apache web server, a possible solution for you might
>> be to look into Apache's mod_rewrite extension that would give you a
>> rule-based rewriting engine to rewrite requested URLs on the fly.
>
> Break, fly, wheel.
>
>
> F'up2 cl.php
>
> PointedEars

And it has nothing to do with PHP. PHP is not involved in URI processing.

FUP'd back to c.l.javascript.

Thomas 'PointedEars' Lahn

unread,
Feb 24, 2008, 6:35:06 AM2/24/08
to
Jerry Stuckle wrote:
> Thomas 'PointedEars' Lahn wrote:
>> DS wrote:
>>> LOL. This is really an Apache question.
>> Not at all. Although not only the OP failed to recognize that, it is about
>> how URI references work as the OP already has the index document of their
>> Web server configured properly. Read RFC 3986.
>>
>>
>> F'up2 cl.php
>> [...]

>
> This has absolutely nothing to do with PHP. If it isn't Apache, then it
> must be javascript.

Nonsense, it has nothing to do with "javascript", and using ECMAScript
implementations is not going to help here. Besides, you are overlooking
that the language has nothing to do with the place where it is used.
ECMAScript implementations can be used server-side as PHP can be used
client-side.

> PHP has nothing at all to do with the URL processing.

Because of the mere fact that the OP uses PHP server-side, cl.php was and is
the group in the *already existing crosspost* where the problem would have
to be discussed further, if it requires to be discussed further.

> fup'd back to c.l.javascript

Idiot. You are not required to reply to a followup to a crossposting
posting that contains a F'up2 header to "turn it around". Learn to
understand how Usenet works, including how to quote.


X-Post & F'up2 cl.php

Steve

unread,
Feb 25, 2008, 5:44:00 PM2/25/08
to
In article
<e0fd892a-6170-4c64...@e10g2000prf.googlegroups.com>,
rajat8...@gmail.com (RAZZ) wrote:

> *Subject:* How to avoid display of filename in URL
> *From:* RAZZ <rajat8...@gmail.com>
> *Date:* Thu, 21 Feb 2008 20:59:18 -0800 (PST)

<HTML><HEAD>
<META NAME="description" content="page name">
<META NAME="keywords" content="some keywords here because this is what
the search engine will see">
<TITLE>Your site title </TITLE>

</HEAD>
<FRAMESET ROWS="100%,*" BORDER="0" FRAMEBORDER="0">
<FRAME SRC="http://www.the site you are masking" SCROLLING="AUTO"
NAME="name" NORESIZE>
</FRAMESET>

</HTML>


Two mouse clicks to break out of it, but it's how the 'big boys' do it !

- Steve

AnrDaemon

unread,
Feb 25, 2008, 6:57:51 PM2/25/08
to
Greetings, rf.
In reply to Your message dated Friday, February 22, 2008, 10:31:01,


>>> When I login to my site initially it load index.php by default. We
>>> can't see the page name index.php displayed in URL.
>>
>>> But when I click to some link on this page it will display the whole
>>> path with file name on address bar and URL. I need that it should not
>>> display my php files names on address bar and URL, how should I
>>> achieve it?
>>
>> Don't write links containing file names. But what is Your PHP question?

> For that matter what is the Javascript question?

Do You see any difference between
http://somewhere/
and
http://somewhere/index.php
?

What I mean "don't write links containing filenames".

Jerry Stuckle

unread,
Feb 25, 2008, 8:03:36 PM2/25/08
to

That's great if you have a one page site.

Tony

unread,
Feb 25, 2008, 8:36:54 PM2/25/08
to
Steve wrote:
> In article
> <e0fd892a-6170-4c64...@e10g2000prf.googlegroups.com>,
> rajat8...@gmail.com (RAZZ) wrote:
>
>> *Subject:* How to avoid display of filename in URL
>> *From:* RAZZ <rajat8...@gmail.com>
>> *Date:* Thu, 21 Feb 2008 20:59:18 -0800 (PST)
>>
>> Hi,
>>
>> When I login to my site initially it load index.php by default. We
>> can't see the page name index.php displayed in URL.
>>
>> But when I click to some link on this page it will display the whole
>> path with file name on address bar and URL. I need that it should
>> not
>> display my php files names on address bar and URL, how should I
>> achieve it?
>>
>>

relative links to the index page like:
<a href="./"></a>
seems to work for index.php

Jerry Stuckle

unread,
Feb 25, 2008, 8:41:15 PM2/25/08
to

If your server is properly configured to do so, that is.

AnrDaemon

unread,
Feb 26, 2008, 1:55:02 AM2/26/08
to
Greetings, Jerry Stuckle.
In reply to Your message dated Tuesday, February 26, 2008, 04:03:36,

>>>>> When I login to my site initially it load index.php by default. We
>>>>> can't see the page name index.php displayed in URL.
>>>>> But when I click to some link on this page it will display the whole
>>>>> path with file name on address bar and URL. I need that it should not
>>>>> display my php files names on address bar and URL, how should I
>>>>> achieve it?
>>>> Don't write links containing file names. But what is Your PHP question?
>>
>>> For that matter what is the Javascript question?
>>
>> Do You see any difference between
>> http://somewhere/
>> and
>> http://somewhere/index.php
>> ?
>>
>> What I mean "don't write links containing filenames".

> That's great if you have a one page site.

It is not my problem, yes? :)
And even more, it is w3c recommendation to NOT expose any underlying
technology by prefixing/suffixing URI's with technology-specific data (s.a.
".php" or the like).

Jerry Stuckle

unread,
Feb 26, 2008, 5:42:31 AM2/26/08
to

That is not what W3C recommends. They only recommend not changing URLs.

Toby A Inkster

unread,
Feb 26, 2008, 6:48:06 AM2/26/08
to
Jerry Stuckle wrote:

> AnrDaemon wrote:
>>
>> And even more, it is w3c recommendation to NOT expose any underlying
>> technology by prefixing/suffixing URI's with technology-specific data
>> (s.a. ".php" or the like).
>
> That is not what W3C recommends. They only recommend not changing URLs.

Indeed. However, they do recommend the avoidance of technology-specific
URLs as a means to achieving the ultimate goal of stable URLs.

So it's counter-productive to go around *changing* existing technology-
specific URLs to more neutral ones; but a good idea to use technology-
neutral URLs for new pages.

--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.17.14-mm-desktop-9mdvsmp, up 27 days, 17:56.]

Bottled Water
http://tobyinkster.co.uk/blog/2008/02/18/bottled-water/

Thomas 'PointedEars' Lahn

unread,
Feb 26, 2008, 2:58:33 PM2/26/08
to
Toby A Inkster wrote:
> Jerry Stuckle wrote:
>> AnrDaemon wrote:
>>> And even more, it is w3c recommendation to NOT expose any underlying
>>> technology by prefixing/suffixing URI's with technology-specific data
>>> (s.a. ".php" or the like).
>> That is not what W3C recommends. They only recommend not changing URLs.

Not true.

> Indeed. However, they do recommend the avoidance of technology-specific
> URLs as a means to achieving the ultimate goal of stable URLs.
>
> So it's counter-productive to go around *changing* existing technology-
> specific URLs to more neutral ones;

It is not, and the advisories make that clear:

http://www.w3.org/QA/Tips/uri-choose
http://www.w3.org/Provider/Style/URI

> but a good idea to use technology-neutral URLs for new pages.

ACK


F'up2 ciwam

0 new messages