So I am operating a website using the PHP Invision Power Board system, and it's kind of old. There are 10,000s of lines of code in it that are custom, and re-writing the website is probably more work then its worth at the moment.

I want to take the URLs and clean them up for some SEO work I am doing.

For instance, I have

http://mysite.com/index.php?act=forum&showtopic=1231245&portal=sdsd

I set up an array to change the portal sdsd to represent some more full value like

sdsd => WebsitePortal1

So what I am trying to do is

http://mysite.com/WebsitePortal1/index.php?act=forum&showtopic=1231245&portal=sdsd

to start off with. When I do this though, the URL thinks i am trying to access some folder that doesn't exist.

I believe this is a .htaccess issue, but I don't know too much about how to work with this. I read a guide, but i am still a bit fuzzy on how to do parts of this.

If in the future I could do something more advanced, it would be to take the original URL and make it something like this instead:

http://mysite.com/WebsitePortal1/forums/1231245

Maybe more tweaking to make it nicer later, but the entire purpose of this is to work on SEO for my website which I know very well.

Can someone help show me how to do this URL re-writing?

I have 9 portals, so if I need to write 9 rules to do the 9 portals that is ok. The part I think that will get confusing is taking portal=sdsd and converting the sdsd into the full string.....if I need to add it to the end of the URL please feel free to tell me.

Thank you

The other thing I could do instead, if this is easier, is forward all reqeust to the website to the main root directory?

Like if I enter http://mysite.com/asdasdas/index.php

the .htaccess should let the URL stay but know that I am accessing the root directory?

Sorry if this is kinda hazy, but I am trying to figure out a good way to about this. Keeping the URL changing within the PHP code would be preferable....but I am not sure how easy it may be

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.