Forum Moderators: phranque
http://www.example.com/huuya.php?page=huuya-review-page1
http://www.example.com/huuya-review-page1/
http://www.example.com/huuya-review-page1.html
[edited by: jdMorgan at 7:42 pm (utc) on Jan 5, 2011]
[edit reason] used example.com to prevent exploits until code is fixed [/edit]
The multiple (.*) patterns will slow your server to a crawl, needing many thousands of back off and retry attempts per page request.
They must be changed for something more specific and which can be read in a single left-to-right pass.
\.* is a pattern that patches multiple periods, like "something........". . Is that what you wanted?
You must add the [L] flag to every rule.
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !^.*/images/.*$
RewriteCond %{REQUEST_FILENAME} !^.*/css/.*$
RewriteCond %{REQUEST_FILENAME} !^.*/js/.*$
RewriteCond %{REQUEST_FILENAME} !^.*/huuya\.php$
RewriteRule ^(.*) huuya.php?page=$1 [L] [edited by: jdMorgan at 7:43 pm (utc) on Jan 5, 2011]
[edit reason] Removed URL to prevent competitor exploits. [/edit]
RewriteRule ^example-review-page([0-9]+)$ /example.php?page=huuya-review-page$1 [L]
[edited by: jdMorgan at 10:15 pm (utc) on Jan 6, 2011]
http://www.huuya.com/huuya.php?page=huuya-reviews http://www.huuya.com/huuya-reviews RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !^.*/images/.*$
RewriteCond %{REQUEST_FILENAME} !^.*/css/.*$
RewriteCond %{REQUEST_FILENAME} !^.*/js/.*$
RewriteCond %{REQUEST_FILENAME} !^.*/huuya\.php$
RewriteRule ^(.*) huuya.php?page=$1 [L] previously >>> http://www.huuya.com/huuya.php?page=huuya-reviews
now >>> http://www.huuya.com/huuya-reviews this hopefully can help others who have same case as mine.
RewriteCond $1 !^huuya\.php$|images/|\.(css|js)$
RewriteRule ^(.*) huuya.php?page=$1 [L]
[edited by: jdMorgan at 4:15 pm (utc) on Jan 9, 2011]
RewriteCond $1 !^images/
RewriteCond $1 !^admin/
RewriteCond $1 ^something [OR]
RewriteCond $1 ^something-else