By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,830 Members | 2,271 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,830 IT Pros & Developers. It's quick & easy.

How to avoid display of filename in URL

P: n/a
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?

Feb 22 '08 #1
Share this Question
Share on Google+
16 Replies


P: n/a
Greetings, RAZZ.
In reply to Your message dated Friday, February 22, 2008, 07:59:18,
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?
--
Sincerely Yours, AnrDaemon <an*******@freemail.ru>

Feb 22 '08 #2

P: n/a
rf

"AnrDaemon" <an*******@freemail.ruwrote in message
news:21**********************@freemail.ru...
Greetings, RAZZ.
In reply to Your message dated Friday, February 22, 2008, 07:59:18,
>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?

--
Richard.
Feb 22 '08 #3

P: n/a
DS
LOL. This is really an Apache question.
Feb 22 '08 #4

P: n/a
rf

"DS" <ds@bigpond.netwrote in message
news:13************@corp.supernews.com...
LOL. This is really an Apache question.
Or perhaps HTML.
Feb 22 '08 #5

P: n/a
rf

"DS" <ds@bigpond.netwrote in message
news:13************@corp.supernews.com...
LOL. This is really an Apache question.
Or perhaps IIS.
Feb 22 '08 #6

P: n/a
On Feb 22, 6:59 am, RAZZ <rajat82.gu...@gmail.comwrote:
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?
<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
Feb 22 '08 #7

P: n/a
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
Feb 24 '08 #8

P: n/a
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.

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

Feb 24 '08 #9

P: n/a
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".
--
Sincerely Yours, AnrDaemon <an*******@freemail.ru>

Feb 26 '08 #10

P: n/a
AnrDaemon wrote:
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".

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

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

Feb 26 '08 #11

P: n/a
Steve wrote:
In article
<e0**********************************@e10g2000prf. googlegroups.com>,
ra***********@gmail.com (RAZZ) wrote:
>*Subject:* How to avoid display of filename in URL
*From:* RAZZ <ra***********@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

Feb 26 '08 #12

P: n/a
Tony wrote:
Steve wrote:
>In article
<e0**********************************@e10g2000prf .googlegroups.com>,
ra***********@gmail.com (RAZZ) wrote:
>>*Subject:* How to avoid display of filename in URL
*From:* RAZZ <ra***********@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

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

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

Feb 26 '08 #13

P: n/a
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).
--
Sincerely Yours, AnrDaemon <an*******@freemail.ru>

Feb 26 '08 #14

P: n/a
AnrDaemon wrote:
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).

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

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

Feb 26 '08 #15

P: n/a
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/
Feb 26 '08 #16

P: n/a
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

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

This discussion thread is closed

Replies have been disabled for this discussion.