New answers tagged

1

So, after more research and trial and error I was able to figure it out. Here is how I have it setup now. <rule name="Redirect1" stopProcessing="true"> <match url="^(.*)$" /> <conditions> <add input="{R:0}" pattern="^(?!\s*$).+$"/> <add input="{R:0}" pattern="^[a-zA-Z0-9_]*$" ...


1

Maybe this would help? RewriteEngine On RewriteCond %{QUERY_STRING} !(^|&)lang=en(&|$) [NC] RewriteCond %{HTTP_HOST} ^www\.myweb\.com\/index.html$ [NC] RewriteRule ^ %{REQUEST_URI}?lang=en [L,R=301,QSA] Only for homepage on addon domain (assuming your addon domain is http://YourAddOn.Domain.com): RewriteEngine On RewriteCond %{QUERY_STRING} ...


4

SOLVED! Thanks to you guys. Solution: # Turn Rewrite Engine On RewriteEngine on # Set the base to /games/ so we need not include it in the rules RewriteBase /games/ #Rewrite for achilles.php?games_path=xxxxxxxxxx.yyy&category_id=zzz RewriteRule ^([0-9a-zA-Z_-]+)/([0-9]+) $1.php?games_path=$1.swf&category_id=$2 [NC,L] ...


2

I have: http://funkygames.co/games/achilles.php?games_path=achilles.swf&category_id=1 I want: http://funkygames.co/games/achilles/achilles/1 or even better: funkygames.co/games/achilles/1 (if that's possible) Try this: RewriteRule ^games/achilles/(.*)/([0-9]+)$ /games/achilles.php?games_path=$1.swf&category_id=$2 [NC,L] And if the game ...


4

You are using the ^ and $ (anchors in regex speak) because you are matching the whole URL, which is what most people want to do, so this is the most common example you see. If you omit the ^ and/or $ anchors then you are only going to be matching part of the URL. eg. anything$ is going to match "anything" at the end of the URL - this could match too many ...



Top 50 recent answers are included