473,387 Members | 1,673 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

PHP query in URL to show as Filename instead.

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

Aug 3 '05 #1
5 1568
lu*******@gmail.com wrote:
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


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
Aug 3 '05 #2
lu*******@gmail.com wrote:
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


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.
js*******@attglobal.net
==================
Aug 3 '05 #3
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
Aug 3 '05 #4
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

Aug 3 '05 #5
JDS
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 | je*****@example.invalid
| http://www.newtnotes.com
DJMBS | http://newtnotes.com/doctor-jeff-master-brainsurgeon/

Aug 3 '05 #6

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

Similar topics

8
by: Beowulf | last post by:
Hi Guru's, I have a query regarding using PHP to maintain a user profiles list. I want to be able to have a form where users can fill in their profile info (Name, hobbies etc) and attach an...
3
by: Harvey | last post by:
Hi, I try to write an asp query form that lets client search any text-string and display all pages in my web server that contain the text. I have IIS 6.0 on a server 2003. The MSDN site says...
19
by: bdt513 | last post by:
I am trying to extract the values from a query using VBA. Specifically, I want to concatenate all the values of the "rosEmail" field from query "qselRosterEmailList" into one string (strEmails). I...
2
by: Bernd Smits | last post by:
Hi, I have to create a query which would be composed of two tables, which have a common field ('FileName'). Now, the query have to be composed of the record who suddisfy to the following...
4
by: Derek Van Cuyk | last post by:
Hi everyone! I'm trying to write a web application in school that utilizes a MS Access database. I can read and everything fine from it but when I try to add a new record I get an exception that...
1
by: Aaron West | last post by:
Try this script to see what queries are taking over a second. To get some real output, you need a long-running query. Here's one (estimated to take over an hour): PRINT GETDATE() select...
11
by: ZafT | last post by:
Hi all - thanks in advance for any help. I am trying to write a simple update script. In fact, I am re-using code that I've used before (successfully) but I can't figure out why it is not...
1
by: TechnoPup | last post by:
Greetings, I am very new to working with databases, and I am not sure how to go about structuring the query I need. What I have is an Access database with approx. 400,000 records in 5 fields. ...
17
by: NeoAlchemy | last post by:
I am starting to find more web pages that are using a query parameters after the JavaScript file. Example can be found at www.opensourcefood.com. Within the source you'll see: <script...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
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$) { } ...
0
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...
0
BarryA
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
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,...
0
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...

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.