0

I'm trying to get my URLs from this:

hxxp://m.newsite.com/index.php?id=12345

To this:

hxxp://m.newsite.com/12345

The trouble I have is I have a shared hosting account and I'm hosting a new domain, so the above URL w/subdomain is technically accessible from:

hxxp://www.originalsite.com/newsite.com/mobile

I've tried a variety of different combinations for mod_rewrite, but I'm afraid I'm just not there! Help!

1 Answers1

0

Put this in the htaccess in the /newsite.com/mobile directorie

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^m\.newsite\.com$
RewriteRule ^([0-9]+)$ index.php?id=$1 [L]
Gerben
  • 16,747
  • 6
  • 37
  • 56