First serious venture into .htaccess...
I'm writing a site that pulls content from a database based on a query string in the url. I want to use .htaccess mod_rewrite to make the urls clean, for example,
will be redirected internally toCode:www.example.com/home/contact/
where the script will write the content for theCode:www.example.com/index.php?s=home&p=contactcontactpage under thehomedirectory.
...I'm getting nothing but 500 errors.
My best guesses are a problem with syntax (I'm not fluent, but I can't find any problems) or an endless loop. I know mod_rewrite is supported by my server, because I have .htaccess files in other directories which use it successfully.
I've tried a lot of variations. I think this is the best I've come up with:
I'd appreciate any help! thanks, everyone.Code:Options +FollowSymLinks RewriteEngine on RewriteBase /clients/directory #this .htaccess is currently in a testing directory RewriteRule ^/([A-Za-z-]+)/*([A-Za-z0-9-]*)/*?$ /page.php?s=$1&p=$2 [NC, L] #match "directory" (letters only) and "page" (IF present, letters and/or numbers)



Reply With Quote

Bookmarks