treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Removing "?" from search

  • Hey I have an html website on my computer and I want to make files for each search. i dont have .htaccess. Is there another way I can do it???

    Please HELP

    example: search"syberfx" search url:http://example.com/?=syberfx I cant make a file with a "?". Thats my problem..

    PLEASE HELP!! Thanks

  • Not to my knowledge. Why would you want to make a file for each search?

  • I cant make a file with a "?".

    the question mark is not part of a file name. it marks the beginning of the query string.

    .htaccess would be the only way to do this transparently. How are you processing your search?

    also:

    ...I have an html website on my computer
    • meaning, on your local computer (not online)?
    • meaning, HTML-only (no CGI or server-side scripting)?
  • Yes. It's an HTML website on my computer(not online)!

  • and...? Did you read our answers above?

    If you want your own search functionality, you're stuck using a server-side language.

    If you want to rewrite URLs, you're stuck using .htaccess.

  • Can I use .htaccess on a html website on my computer?

  • Yes but the point is, is that you should use a server side language for this. Otherwise I would just use Google Site Search.

    How can you predict what others will search?

  • Can I use .htaccess on a html website on my computer?

    I would have assumed you could, but you said earlier that you couldn't.

    Otherwise I would just use Google Site Search.

    I second this.

  • @traq

    Sometimes hosting providers limit what you can do. Some won't even allow PHP. I'm assuming that is why he can't. Unless he's naming the .htaccess file to something like stuff.htaccess instead of just .htaccess.

  • True.

    @davidkrasniy, a few posts back you said the site is on your own computer (not online).

    Is it staying there, or will it eventually be published on the web? If so, do you know what features your host supports?