.htaccess tutorial

htaccess Elite


search engine-friendly url

Ask your mod_rewrite and Redirection questions here, and get answers!

search engine-friendly url

New postby gabo » 16 Dec 2006 20:53

Hi!!

i have a question and i cannot find the answer anywhere T.T maybe some of you can help me :DD

i need to redirect a url wich contains a word, an id word, and an extension, to other url wich has the sign '?' and some params. I mean:

/read123.htm redirects to /cnt.php?id=123

i know that i can do that from the .htaccess file, but i've tryed and tryed and i just won a 500 Internal Server Error =_=

i hope some of you can help me (:

thanks!!

greetings
g a b o..
gabo
 
Posts: 2
Joined: 16 Dec 2006 20:47
Location: Argentina

New postby gabo » 17 Dec 2006 02:27

Hi..ejem..

several hours later, i found the answer in a WorldPress' tutorial. This is just like making a permalink url, and i did it this way:

(in the .htaccess file)
Code: Select all
RewriteEngine On
RewriteRule ^ver_(.*)?\.php$ /cnt.php?id=$1 [QSA]


And now in my web http://www.cqsoft.com.ar when some one tries to acced to ver_ID.php it automatically loads cnt.php?id=ID, wich is the script that works with my CMS. Cool ;)

I hope it was usefull, so i post here 'cos it was so hrd to find =_=

bye


(i'm not english, u see XDDD)
g a b o..
gabo
 
Posts: 2
Joined: 16 Dec 2006 20:47
Location: Argentina


Return to Redirect or Rewrite Questions