hookway Posted February 20, 2009 Share Posted February 20, 2009 Hi Is it possible to rewrite the URL for forums threads that appear? For example, can forum/xyz123 become forum/topic1/thread1 ? If so, is such a rewriting “stable” (or can it be easily changed somehow). I understand that the reference after the domain name is similar to folders on a desktop, does rewriting the forum threads affect the location of the data in anyway? Any help with this is appreciated. Quote Link to comment Share on other sites More sharing options...
jackpf Posted February 20, 2009 Share Posted February 20, 2009 You can use rewrite rules with apache in your htaccess file to make something look like this forum/reading/how-to-read be processed by this forum.php?sub=reading&id=2355 Quote Link to comment Share on other sites More sharing options...
hookway Posted February 21, 2009 Author Share Posted February 21, 2009 Hi Just to clarify, In the example, it starts of as something like: forum.php?sub=reading&id=2355 and ends up as: forum/reading/how-to-read Is that right? Pardon me if the question is obvious, I just wish to make sure. Quote Link to comment Share on other sites More sharing options...
jackpf Posted February 21, 2009 Share Posted February 21, 2009 Yeah, like basically...what htacces rewrite rules can do is if someone types in: forum/reading/how-to-read the htaccess file will take the url, and it will be processed a file you specify, such as: forum.php?sub=reading&id=456 Take a look here. That'll give you the best answers Quote Link to comment Share on other sites More sharing options...
SuperBlue Posted February 22, 2009 Share Posted February 22, 2009 Perhaps its easier to say, that rewrite rules works as aliases for the real URLs. Quote Link to comment Share on other sites More sharing options...
hookway Posted February 23, 2009 Author Share Posted February 23, 2009 I appreciate the help. Are the rewrites secure, it's not possible for a user to somehow get to a password protected area? Is the rewrite literally just a rewrite, merely the URL rewritten and given a different name? Quote Link to comment Share on other sites More sharing options...
jackpf Posted February 23, 2009 Share Posted February 23, 2009 It's completely secure. Loads of people use them. Infact, this forum does. All it is is taking the url, and having it processed by a file you specify. It acts exactly as if the person is typing in the file name. Quote Link to comment Share on other sites More sharing options...
corbin Posted February 24, 2009 Share Posted February 24, 2009 mod_rewrite does not password protect directories, but it also does not allow one to bypass protection. 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.