Jump to content

Replacing ? and & with /


Azu

Recommended Posts

Hi how can I make it so that instead of using ? and & in my get queries, I can just use / instead?

I'm using abyss server on windows btw.

 

I'd really appreciate it if someone could tell me how please ^^

 

So that like instead of site.com/?foo=bar&hello=world it would be site.com/foo=bar/hello=world

 

I want to do this so that it is more search engine friendly so that the spiders won't hate me and stuff and also so that the firefox extension that lets you go up 1 level when you press alt+up arrow will work, taking you from site.com/foo=bar/hello=world to site.com/foo=bar :)

Link to comment
Share on other sites

Okay thanks.. I think the mod_rewrite works.. I don't really understand how to use it for this though :S

 

I'm not sure how I can implement it..

 

Please help =x

 

I just need a way to make it so that people use / instead of ?& and it will work the same way (so that I can access it with $_GET)

Link to comment
Share on other sites

Actually nevermind, I don't think modrewrite is what I am looking for.

 

I just want to replace ? and & with / it's really that simple.

 

I don't want to redirect them or anything.

 

I just want to do exactly what I said in my first post..

So that like instead of site.com/?foo=bar&hello=world it would be site.com/foo=bar/hello=world

 

What I meant by that is exactly what I said.

 

I want people to be able to just type in site.com/foo=bar/hello=world instead of site.com/?foo=bar&hello=world

And work EXACTLY the same way as before! The only differance should be the url in the address bar/the url in ahref links!

 

I hope I explained it right this time..

 

In case I didn't I will explain it again;

I want to replace ? and & with /

 

So that / will have the EXACT same effect as ? and & used to.

 

Thanks for your patience and time.

 

Please tell me how to do this now okay..? I've been trying for so long and I just can't get it to work =(

 

Again in case I didn't explain it right, I just want to replace ? and & with /. It is that simple.

 

Then there will be no way for people to tell that my pages use PHP, and also they will be more search engine friendly.

 

Thanks again for your time.

 

P.S.

Please move this back to the PHP forum where I posted it!

I am running Abyss instead of Apache but that should make no differance.

 

This solution should work for all web servers that use PHP, it shouldn't be anything specific to Abyss, thanks!

Link to comment
Share on other sites

  • 3 weeks later...

Can somebody PLEASE move this back to the PHP section where I posted it since it has absolutely nothing to do at all with any specific web servers? Thank you.........

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.