We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 48586
    • 78 Posts
    Hello, I'm updating my .htaccess file and not seeing results on my site, I've cleared cache and not sure what I am missing. Here is a sample line from my .htaccess file:

    RewriteCond %{HTTP_COOKIE} market=([tampa]) [NC]
    RewriteRule ^things-to-do(.*)$ /tampa/things-to-do$1 [L,R=301]
    


    Basically, if someone comes to my site and types "http://www.mysite.com/things-to-do" (or even http://www.mysite/things-to-do/windsurfing etc) it will insert their location to the URL to read http://www.mysite.com/tampa/things-to-do ( http://www.mysite/things-to-do/windsurfing etc)

    Friendly URLs are working fine on my site, and looking at my current .htaccess file I don't think I have to escape any of those characters. Is there an extra MODX step I'm missing to get the .htaccess file working? Thank you.

    This question has been answered by rjohnson375. See the first response.

    • discuss.answer
      • 48586
      • 78 Posts
      OK, I somewhat figured out my issue, I had the rewrite rules at the bottom of my htaccess file, and when I moved them above the friendly urls part it started to work.

      The only problem I am having now is that the cookies are sometimes setting to an incorrect value, so maybe deleting my cache folder in core might fix that.