Tag Info

Hot answers tagged

2

But the Official documentation clearly states it is used only for the RewriteRule directive. The docs don't say that it can only be used on the RewriteRule directive. The page you link to (which incidentally is specifically about the RewriteRule flags) simply states: Use of the [NC] flag causes the RewriteRule to be matched in a case-insensitive ...


2

I personnaly use this: RewriteEngine on RewriteCond %{HTTP_HOST} !\..+\. RewriteRule (.*) http://www.%{HTTP_HOST}/$1 [R=301,L] It checks if there is NOT 2 dots in the domain name. This is very similar to what w3d proposed, I just find it more readable. And as w3d stated, it is impossible to have a fully generic solution because nothing allow to guess how ...


1

As I understand, you want requests for the following URL website.com/games/271/game-name-here to be handled by games.php For this, you may use a simpler rule. RewriteRule ^games/(.*)$ /games.php?var=$1 [L] This will send all requests with /games/ to games.php. For e.g. /games/271/game-name-here will go like this /games.php?var=271/game-name-here Now, ...



Only top voted, non community-wiki answers of a minimum length are eligible