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

PHP query in URL to show as Filename instead.

0 views
Skip to first unread message

luke...@gmail.com

unread,
Aug 3, 2005, 6:18:30 AM8/3/05
to
Hi there.

Could someone please help me.

Is it possible to show addresses such:
http://www.spanishinvest.com/list.php?area_id=5

like this instead:
http://www.spanishinvest.com/area_costa_del_sol.html

Thanks for any advice in advance.
Luke

Erwin Moller

unread,
Aug 3, 2005, 6:53:42 AM8/3/05
to
luke...@gmail.com wrote:

Hi Luke,

The first:
http://www.spanishinvest.com/list.php?area_id=5
calls the php-script named list.php.
In this script it is possible to retrieve the passed value for area_id.
Like this
$areaID = $_GET["area_id"];

What the script uses that value for, I cannot say of course.

The second is just a normal URL:
http://www.spanishinvest.com/area_costa_del_sol.html

and has nothing to do with PHP, because it is plain HTML.

What is your problem/question excactly?

Regards,
Erwin Moller

John Dunlop

unread,
Aug 3, 2005, 7:18:14 AM8/3/05
to
Somebody wrote:

> Is it possible to show addresses such:
> http://www.spanishinvest.com/list.php?area_id=5
>
> like this instead:
> http://www.spanishinvest.com/area_costa_del_sol.html

Yes. Search term: mod_rewrite.

--
Jock

Jerry Stuckle

unread,
Aug 3, 2005, 8:14:41 AM8/3/05
to

This isn't a php problem.

If you're using Apache look into mod_rewrite and .htaccess.

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

Sergej Andrejev

unread,
Aug 3, 2005, 7:41:08 AM8/3/05
to
If you use apache and have root privileges you should use
mod_rewrite (look in your httpd.conf)
here is a totorial
http://www.sitepoint.com/article/guide-url-rewriting/

and the geek's way also an apache mod :}
With mod_mime you can associate php mime with other extension

JDS

unread,
Aug 3, 2005, 10:43:21 AM8/3/05
to
On Wed, 03 Aug 2005 04:41:08 -0700, Sergej Andrejev wrote:

> If you use apache and have root privileges you should use

You don't even need root privs, just AllowOverride privs within Apache.

Not PHP-related, though.

--
JDS | jef...@example.invalid
| http://www.newtnotes.com
DJMBS | http://newtnotes.com/doctor-jeff-master-brainsurgeon/

0 new messages