Jump to:

23370 Posts in 18160 Topics by 2864 members

General Questions

SilverStripe Forums » General Questions » htaccess rewrite

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 300 Views
  • lozhowlett
    Avatar
    Community Member
    146 Posts

    htaccess rewrite Link to this post

    Hi everyone

    I have a site that was a .aspx site we have merged over to SS

    I have a rewrite rule in place...

    RewriteRule ^resortdetails.aspx?ResortCode=2068 inspireme [R=301,NC,L]

    But it doesnt work, any ideas?

    This works fine...
    RewriteRule ^resortdetails.aspx inspireme [R=301,NC,L]
    ... but i need to it handle different IDs to point to different sections of the site.

    Thanks in advance!

  • swaiba
    Avatar
    Forum Moderator
    1784 Posts

    Re: htaccess rewrite Link to this post

    You're in luck - I had to do the exact thing last week... one of these for each...

    RewriteCond %{REQUEST_URI} ^/resortdetails\.aspx$
    RewriteCond %{QUERY_STRING} ^ResortCode=2068$
    RewriteRule ^(.*)$ http://www.somefulldomain.com/inspireme [R=301,L]

    If you can tell me how to redirect to a "clean" URL without still passing the params then I'd love to hear back

    300 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.