Wrox Programmer Forums
|
Pro PHP Advanced PHP coding discussions. Beginning-level questions will be redirected to the Beginning PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 24th, 2004, 12:54 PM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 117
Thanks: 0
Thanked 2 Times in 2 Posts
Default URL

Hi
How can I change my URL? for example right now my URL is look like this http://www.mysite.com/center.php?cat=s&page=1 and I want to make it look like http://www.mysite.com/center?cat=s&page=1 or
http://www.mysite.com/center/?cat=s&page=1

Thanks
Regards
Mani_he

 
Old November 24th, 2004, 03:12 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Create a directory called center in the root of your site. Copy center.php to that directory and rename it to index.php.

Happy coding!

-Snib
Where will you be in 100 years?
Try new FreshView 0.2!
 
Old November 24th, 2004, 03:33 PM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 117
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Thanks Snib
But that one is only works for http://www.mysite.com/center/?...
if I want to get something like:
http://www.mysite.com/center?...
What should I do?

Thanks
Regards
Mani_he

 
Old November 24th, 2004, 04:38 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Must you get rid of the slash? In your original message you seemed to be okay with either the slash or without.

Typing the URL without the slash should do exactly the same thing as with.

-Snib
Where will you be in 100 years?
Try new FreshView 0.2!
 
Old November 24th, 2004, 08:16 PM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 117
Thanks: 0
Thanked 2 Times in 2 Posts
Default

So you mean it's the same way for both with slash and without slash

Thanks
Regards
Mani_he

 
Old November 25th, 2004, 12:23 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Yes.

http://yourdomain/dir/

should take you to the same thing as

http://yourdomain/dir

They both should take you to http://yourdomain/dir/index.php (not a redirect, more like an include).

-Snib
Where will you be in 100 years?
Try new FreshView 0.2!
 
Old December 4th, 2004, 05:06 PM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 117
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Hi Snib
I still have problem on the url.
I did create the directory called center and I create index.php and put it inside that directory.
on my home page have thosr links

Home -> ../center?req=home
product -> ../center?req=product

but when the users click on any of those links above the address bar shows center/?req=home

but i want to get center?req=home

 
Old December 4th, 2004, 08:12 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Why do you want it to show that if it does exactly the same thing?

-Snib - http://www.snibworks.com
Where will you be in 100 years?
 
Old December 5th, 2004, 08:53 PM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 117
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Hi Snib

I saw it in yahoo, So i wondering how they did it (http://www.mysite.com/center?req=...)

I mean it is good that nobody knows what program you used for making website.

Right now i really want to make my url on the address bar like
http://www.mysite.com/center?req.. without any slash

Thanks
Regards
Mani_he

 
Old December 6th, 2004, 01:05 PM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 117
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Hi Snib
Can you help for that also?

Thanks
Regards
Mani_he






Similar Threads
Thread Thread Starter Forum Replies Last Post
URL Redirect based on given URL somnath.kartic VS.NET 2002/2003 1 August 2nd, 2012 08:21 AM
URL rewriting with URL forwarding mtabyana BOOK: Professional Search Engine Optimization with PHP: A Dev's Guide to SEO ISBN: 978-0-470-10092-9 0 October 22nd, 2007 08:22 AM
extract URL from Favorites (.URL Files) PhilHawks VB.NET 2002/2003 Basics 2 November 2nd, 2004 04:35 AM
get URL marcrock Javascript How-To 4 February 6th, 2004 11:33 AM
Url Help morpheus Classic ASP Basics 2 January 27th, 2004 12:59 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.