MPAA - MPAA - Free eBooks Download - My Space Layouts - Polish classifieds in the USA

PDA

View Full Version : mod_rewrite for specific url


juancito
Apr 19th 2004, 12:38 am
hi guys... nice forum going on here :)
ok.. I've searched every topic about this almost close to what I need but I can't find the solution..
what I want to do is redirect an url to another one..

for example:

hxxp://www.mysite.com/in8/index.php?cat=1&start=10&t=sub_pages&link_order_c=link_name&link_sort_c=asc

to

hxxp://www.mysite.com/index.php?module=PostWrap&page=action

If I could just specify which url redirect to where.. would be fantastic...

can this be done?

I don't need a wildcard directive for this... as it is not this only url.. it can be
hxxp://www.mysite.com/in8/index.php?cat=2&start=10&t=sub_pages&link_order_c=link_name&link_sort_c=asc
(note cat=2 instead of cat=1)

to redirect to

hxxp://www.mysite.com/index.php?module=PostWrap&page=action2

thank you!

hexed
Apr 19th 2004, 1:50 am
If you use mod_rewrite, you will still need the values in your URL. Take this for example:

http://www.domain.com/main.php?item=1&item2=cows

can be reformed as:

http://www.domain.com/1/cows/main.html

Notice the /1/ and /cows/. You need the values somewhere in your URL in order to parse them.

I'm a guru with mod_rewrite, send me a line at

ryan /at/ edsolutions.ca

replace the /at/ with @. Did this so I don't get picked up by email harvesters.

juancito
Apr 19th 2004, 12:33 pm
hi Hexed.. can you help me out with the .htaccess file? I'm clueless on this matter :(