I need a rewrite rule that allows full stops. How can I allow for this? What I want is for
shop/domain/www.test.com to become shop/domain/controller.php?param1=www.test.com
The original rule I have is below:
RewriteRule ^shop/domain/([^/.]+)/?$ shop/stock/controller.php?param1=$1 [NC]
This works but only if I remove the full stop.
I have also tried the following:
RewriteRule ^shop/domain/([^/]+)/?$ shop/domain/controller.php?param1=$1 [NC]
This allows the full stop but then has controller.php is the parameter when it should be http://www.test.com.
If all domains begin with “www.”, you could do this
The problem with your rule is, that it also matches
controller.phpas if it were a domain. You can add the following two rewrite conditions to prevent this:!-dmeans not an existing directory,!-fmeans not an exisiting file (e.g.controller.php).