Hello! I am having an issue with a .htaccess file in order to convert name.com/?word=hello into name.com/hello, can any one offer a suggestion if this is possible? I've been looking everywhere and I couldn't find much to solve this issue... My site is kind of search engine dictionary using ajax to display results from search but I want to offer my visitors the option that when they go to my name.com/keyword to show the description, currently it works only with name.com/?word=keyword Thank you in advance! P.S. name.com is a fictive domain, it's not actually my real domain.
well does your site have only an index page? else i see a problem with such a generic statement. suppose someone wants to view someother page u may have assume "aboutus.html" then it gets redirected to name.com/?word=aboutus.html it gets slightly complex is you want to conditionally filter this out. What i suggest is u make name.com/word/keyword redirect to name.com/?word=keyword in this case the redirect is RewriteRule ^word/([^/]+) http://name.com/?word=$1
Try the following. That way, if the file actually exists it will not be rewritten. For example, if there is a file /foo.jpg, it will not become /?word=foo.jpg. RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ ?word=$1 [L,QSA] Code (markup):