-
.htaccess RewriteEngine
Dear All,
Please help me to fix this I am new to RewriteEngine Rules
I have a WHOIS Lookup Script on my website
The URL is http://whois.domain.com/whois.php?domain=example.com
Now I need to achieve this http://whois.domain.com/example.com
So I wrote
RewriteEngine On
RewriteRule ^([\w\-]*)$ whois.php?domain=$1
In the above code I am not getting the domain extension passed, I know the code is wrong, but dont know where.
Please HELP.
-
You forgot to match the point. Plus "\w" will not match numbers and other weird characters.
Try this instead (not tested):
RewriteRule ^([a-z0-9\-\._]+\.[a-z]+)$ whois.php?domain=$1
-
When I use
RewriteRule ^([a-z0-9\-\._]+\.[a-z]+)$ whois.php?domain=$1
I get an ERROR
Sorry, that tld is not supported.
------------------------------------------------------------
But, If I delete the .htaccess and use the below URL it works fine
http://whois.domain.com/whois.php?domain=example.com
-
Hmm I don't really see anything wrong on first sight...
Could you post the TLD that gave the error?
-
I just tried with demo.com
-
Please Help When I use
RewriteRule ^([a-z0-9\-\._]+\.[a-z]+)$ whois.php?domain=$1
I get an ERROR
Sorry, that tld is not supported.
-
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
|
Bookmarks