Changing Url Output

Thread Solved

Join Date: Aug 2009
Posts: 93
Reputation: valonesal is an unknown quantity at this point 
Solved Threads: 2
valonesal's Avatar
valonesal valonesal is offline Offline
Junior Poster in Training

Changing Url Output

 
0
  #1
Sep 3rd, 2009
I have pages written in html that use javascript and css, what I would like to do is use php to change how the url comes out.

So I would like the url to look like mywebsite.com/index.php?xx1122 or something like that without disclosing the location of the html files or the type of files they are.

I have been working on this for 3 days and still cant find an answer to this. Im hoping someone can help me with this.

Please keep in mind that I am a php newbie. Thank you all.
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 53
Reputation: SimonMayer is an unknown quantity at this point 
Solved Threads: 10
SimonMayer SimonMayer is offline Offline
Junior Poster in Training

Re: Changing Url Output

 
0
  #2
Sep 3rd, 2009
You would have to use a .htaccess file to do that.
.htaccess files are straightforward once you are used to them, but can be a little tricky to begin with.

Please could you post an example of the current url and what you would like the replacement url to be?
That way, maybe someone can give you an example syntax for the .htaccess file.


Please note, if you're not sure what you are doing with the .htaccess, you could potentially break other urls on your website.
Regards,

Simon Mayer
Website design by Ribbontree
Reply With Quote Quick reply to this message  
Join Date: Aug 2009
Posts: 93
Reputation: valonesal is an unknown quantity at this point 
Solved Threads: 2
valonesal's Avatar
valonesal valonesal is offline Offline
Junior Poster in Training

Re: Changing Url Output

 
0
  #3
Sep 3rd, 2009
Currently the url is pretty straight forward http://mywebsite.com/folder/folder/folder/file.html

I would like it to be something without so many folders and to not end in html. but something that doesn't let them know where the file is such as http://mydomain.com/get.php?12345
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 596
Reputation: buddylee17 has a spectacular aura about buddylee17 has a spectacular aura about 
Solved Threads: 125
buddylee17's Avatar
buddylee17 buddylee17 is offline Offline
Posting Pro

Re: Changing Url Output

 
0
  #4
Sep 3rd, 2009
Lost time is never found again.
- Benjamin Franklin
Reply With Quote Quick reply to this message  
Join Date: Aug 2009
Posts: 47
Reputation: EvolutionFallen is an unknown quantity at this point 
Solved Threads: 8
EvolutionFallen EvolutionFallen is offline Offline
Light Poster

Re: Changing Url Output

 
0
  #5
Sep 3rd, 2009
This has more to do with your web server than PHP. If you are using an Apache web server, do some research on "mod_rewrite".

Edit: As I see buddylee17 has already recommended =)
Last edited by EvolutionFallen; Sep 3rd, 2009 at 7:14 pm.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the PHP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC