Jump to content

  • Log in with Facebook Log in with Twitter Log In with Google      Sign In   
  • Create Account

Subscribe to HRA Now!


Are you a Google Analytics enthusiast?

Share and download Custom Google Analytics Reports, dashboards and advanced segments--for FREE! 




From the folks who brought you High Rankings!

- - - - -

Redirect From Directory To Root + Parameter Url Treatment

  • Please log in to reply
1 reply to this topic

#1 buster13


    HR 2

  • Members
  • PipPip
  • 10 posts

Posted 08 June 2011 - 04:54 AM

I have to redirect my shopping cart directory to Root now.


to be redirected to Root now


/mens/t-shirts/ => index.php?c=13

My solution is like this and it works,

RedirectMatch 301 /shop/(.*) /$1
RewriteRule ^mens/t-shirts/$ index.php?c=13 [L]

Final URL: example.com/mens/t-shirts/ which backend loads example.com/index.php?c=13

May I ask if these 2 sentences is the MOST efficient way?
Is there a way to combine into 1 line of coding instead of 2?

#2 Michael Martinez

Michael Martinez

    HR 10

  • Active Members
  • PipPipPipPipPipPipPipPipPipPip
  • 5,325 posts
  • Location:Georgia

Posted 08 June 2011 - 12:12 PM

You have to put each directive on its own line, so far as I know. And I don't know of any combined directives.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

We are now a read-only forum.
No new posts or registrations allowed.