Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > Pro PHP
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 24th, 2004, 12:54 PM
Friend of Wrox
 
Join Date: Aug 2004
Location: , , .
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

Reply With Quote
  #2 (permalink)  
Old November 24th, 2004, 03:12 PM
Friend of Wrox
 
Join Date: Nov 2003
Location: , , .
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!
Reply With Quote
  #3 (permalink)  
Old November 24th, 2004, 03:33 PM
Friend of Wrox
 
Join Date: Aug 2004
Location: , , .
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

Reply With Quote
  #4 (permalink)  
Old November 24th, 2004, 04:38 PM
Friend of Wrox
 
Join Date: Nov 2003
Location: , , .
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!
Reply With Quote
  #5 (permalink)  
Old November 24th, 2004, 08:16 PM
Friend of Wrox
 
Join Date: Aug 2004
Location: , , .
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

Reply With Quote
  #6 (permalink)  
Old November 25th, 2004, 12:23 PM
Friend of Wrox
 
Join Date: Nov 2003
Location: , , .
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!
Reply With Quote
  #7 (permalink)  
Old December 4th, 2004, 05:06 PM
Friend of Wrox
 
Join Date: Aug 2004
Location: , , .
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

Reply With Quote
  #8 (permalink)  
Old December 4th, 2004, 08:12 PM
Friend of Wrox
 
Join Date: Nov 2003
Location: , , .
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?
Reply With Quote
  #9 (permalink)  
Old December 5th, 2004, 08:53 PM
Friend of Wrox
 
Join Date: Aug 2004
Location: , , .
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

Reply With Quote
  #10 (permalink)  
Old December 6th, 2004, 01:05 PM
Friend of Wrox
 
Join Date: Aug 2004
Location: , , .
Posts: 117
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Hi Snib
Can you help for that also?

Thanks
Regards
Mani_he

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 09:43 PM.


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