Rewriting 4 variables

Using mod_rewrite to handle various content issues

Rewriting 4 variables

Postby Guest » Tue Jan 11, 2005 8:57 pm

Can somebody help with this? I need to rewrite:

test.html?action=some&id=12345&thing=12345&bla=&category=1&

to something like:

12345-12345-1.html

Is it possible? Thanks in advance!
Guest
 

Postby Caterham » Wed Jan 12, 2005 1:39 am

you can use mod_rewrite only to write the link back. You've to change all links within the sourcecode of your script to the format
12345-12345-1.html

To write the links back: .htaccess
Code: Select all
RewriteEngine On
RewriteRule ^([0-9]+)-([0-9]+)-([0-9]+)\.html$ test.html?action=some&id=$1&thing=$2&bla=&category=$3& [L]
Caterham
 
Posts: 690
Joined: Fri Dec 10, 2004 1:30 pm

Postby Guest » Wed Jan 12, 2005 4:01 pm

Thank you Caterham. I know that I must change the links myself :)
Guest
 


Return to Content

Who is online

Users browsing this forum: No registered users and 3 guests

cron