Forum Moderators: phranque
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} -s
RewriteRule ^index\.shtml$ index.html [T=/text/x-server-parsed-html,L]
RewriteCond %{REQUEST_FILENAME} !-s
RewriteRule ^index\.html$ /cgi-bin/index.cgi [T=application/x-httpd-cgi,L]
RewriteRule ^/?([a-zA-Z_]+)$ /?lang=$1 [L]
What use to be my-domain.com/?lang=EN Should become
"When the user requests X, the browser's address bar should show Y, while the page shows content that lives at location Z."
"When the user requests X, the browser's address bar should show Y, while the page shows content that lives at location X."
RewriteEngine On
RewriteBase /
DirectoryIndex /cgi-bin/index.cgi
RewriteRule ^([a-zA-Z]+)/?$ ?lang=$1 [L]
RewriteRule ^([a-zA-Z]+)/([a-zA-Z-]+)/?$ ?lang=$1&sec=$2 [L]
"When the user requests X, the browser's address bar should show Y, while the page shows content that lives at location X."
The trailing slash should not be optional.