.htaccess - htaccess and regex - handling domain in url -


Imagine in my website I want to show some analytic about domain, the URL of the work that I need:

http://whois.domaintools.com/google.com

As you see in the URL above, this google .com in order to process a variable and given variables, it has passed it to another page, which is exactly what I want

To find such a variable, here is my regague:

/ ^ [A-zA-Z \ d] + (?: -? [ A-zA-z \ d]) + \. [A-zA-Z] + $ /

The above RegEx is simple and it accepts everything: google.com , so my . In the htaccess file I have:

  RewriteRule ^ [A-zA-Z \ d] + (?: - [[a-zA-Z \ d]) + \ . [A-zA-Z] + $ Module / Page / page.php? Domain = $ 1   

The above rule tries to redirect each domain to page.php , but this is the domain Not passing as variable ... I tried to keep (. *) $ in the end, but it is not working ....

How can I get it?

Thanks

Change your rewrite rule to:

  RewriteRule (^ [A-zA-Z \ d + + (?: - [[a-zA-Z \ d]) + \. [A-zA-Z] + $) Module / page / page.php? Domain = $ 1 [L, R = 301]    

Comments

Popular posts from this blog

python - Writing Greek in matplotlib labels, titles -

c# - LINQ to Entities does not recognize the method 'Int32 IndexOf(System.String, System.StringComparison)' method -

Pygame memory leak with transform.flip -