gerkintrigg Posted July 11, 2012 Share Posted July 11, 2012 I've got my site working pretty much as I want it: http://www.truro.com but when I search for something (doesn't matter what) and find a page, When I click on it, It directs me to a page like: http://www.truro.com/pages/Ghostly~Publishing/Ghostly~Publishing.html Everything's great so-far. Then when I get there, the URL in the top bar reads like the ugly database code that sits behind it: http://www.truro.com/pages/pages/reader.php?profile=Ghostly~Publishing&page=Ghostly~Publishing Both pages are essentially the same because of the Mod re-write rule: RewriteRule ^pages/(.*)/(.*)\.html http://www.truro.com/pages/pages/reader.php?profile=$1&page=$2 [L] Is there something I'm doing that means I don't see the pretty URL I want to see? Quote Link to comment Share on other sites More sharing options...
requinix Posted July 11, 2012 Share Posted July 11, 2012 Only use the path and query string parts of the new URL. No protocol or domain name: if you include them then mod_rewrite will force a redirect rather than just (silently) change which file the request points to. Quote Link to comment Share on other sites More sharing options...
gerkintrigg Posted July 11, 2012 Author Share Posted July 11, 2012 That explains it. Beautiful! Quote Link to comment Share on other sites More sharing options...
gerkintrigg Posted July 11, 2012 Author Share Posted July 11, 2012 Massive thanks by the way. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.