Avatar of Sudhindra A N
Sudhindra A N
Flag for India asked on

URL rewriting help!!!

Hello experts..
please help me in rewriting the url, say http://somesite.com/details.php?siteid=www.newsite.com to something like http://somesite.com/www.newsite.com

I created a rewrite rule but it is not working.  May be the problem with the regular expression i used...

my .htaccess file contents are given below...
---
RewriteEngine on

RewriteRule ^www\.[a-zA-Z0-9._-]+\.[a-zA-Z]{2,6}$ stats.php?site=$1
----
Apache Web ServerWeb Development

Avatar of undefined
Last Comment
Sudhindra A N

8/22/2022 - Mon
dsmile

I think you mean

RewriteEngine on

RewriteRule ^www\.[a-zA-Z0-9._-]+\.[a-zA-Z]{2,6}$ details.php?siteid=$1
ASKER CERTIFIED SOLUTION
dsmile

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Sudhindra A N

ASKER
Works great..
Many thanks...
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck