Will this work at all?

New to mod_rewrite? This is a good place to start.

Will this work at all?

Postby yking90 » Tue Jan 31, 2006 4:04 am

------------------
Debug 1
Reload 1
RewriteCond REQUEST_FILENAME !-d
RewriteRule ^/([A-Za-z0-9-%20]+)$ /search.aspx?keyword=$1
------------------

Basically, as you can tell, what i'm trying to achieve here is such that if someone keys in www.xyz.com/flowers, whatever is the keyword trailing the / after the URL, is used directly as the querystring for the search... but what if flowers is a directory on my server? apparently, it doesn't goto the directory, it simply thinks it's a querystring and tries to search for it. I'm trying to put a condition as such that it should first check if it's a directory, if not, it's a querystring.

Please advise at your earliest convenience.

Thank you
-Y
yking90
 
Posts: 1
Joined: Tue Jan 31, 2006 4:02 am

Return to Beginner's Corner

Who is online

Users browsing this forum: No registered users and 4 guests

cron