Hello. I am trying to figure out how do I make my server show pages in this format: When server side those will be translated correspondingly to: Also if a user enters the second option in the browser (site.com/?page1), he should be redirected to the main URL at site.com/page1. Currently I use this: RewriteEngine on RewriteRule ^([A-Za-Z0-9]+)$ /?$1 Code (markup): But I keep getting a 500 Internal Server Error.
You are probably getting the HTTP 500 error due to A-Za-Z. That can be rewritten as A-Za-z or simply A-z, but it still won't detect the . in .html Instead try: RewriteRule ^([^/]+)$ /?$1 [L] Code (markup):
I still get a 500 error with this in my htaccess: The error appears in both cases: site.com/?page or site.com/page