Jump to content
xisto Community
Sign in to follow this  

Help Needed: Rewritting Uris From .htaccess Making ugly dinamyc URIs look nicer

Recommended Posts

I think this should be easy for someone experienced, but I have never done something similar, so I need a bit of guidance.


I have a mini-site under a subdomain that entirelly relies on dynamic URIs. All pages have URIs in the form





and so on. The index.php script takes care of retrieving the appropriate content from both the database and some include files, and everything is working fine. Only that these URIs look quite ugly on any visitor's browser, and I want to make them prettier.

I have read that I can use RewriteRule on the .htaccess file to make them look like




and so on; but my ability with regular expressions is null (the few attempts I have ever made to use regular expressions for anything have devolved into too deep recursions or something that didn't do what I wanted; on most cases both :) ). Also, I'm a bit worried because the examples I have found on the web use paths relative to the root "/", rather than absolute; but these should only be applied to the subdomain.


In summary, I'd like to have URIs converted like this:


http://towo.dragon-tech.org/cat/mainlanguagecode/sectionname => http://forums.xisto.com/no_longer_exists/=languagecode&section=sectionname

http://towo.dragon-tech.org/cat/mainlanguagecode/sectionname?whatever => http://forums.xisto.com/no_longer_exists/=languagecode&section=sectionname&whatever


and I need this to not mess up with URIs in the main domain or other subdomains of the site.


Any help will be appreciated.


BTW, sorry for the "auto-links", but I don't know how to disable them :P

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.