URL Rewrite help

New to mod_rewrite? This is a good place to start.

URL Rewrite help

Postby Neso » Thu Jul 16, 2009 12:23 pm

Hi, can sombody help me and tell me how to change this type of URL:

http://www.mysite.com/search.php?query= ... 0&search=1

to this type

http://www.mysite.com/volim+te.html


Thank you
Neso
 
Posts: 1
Joined: Thu Jul 16, 2009 11:49 am

Postby jntwebdesigns » Thu Jul 16, 2009 1:43 pm

Try this:

<IfModule mod_php4.c>
php_value session.use_trans_sid 0
</IfModule>
Options +FollowSymLinks
RewriteEngine On
RewriteRule ([^.]+).html search.php?query=$1&results=20&search=1 [L]
jntwebdesigns
 
Posts: 3
Joined: Thu Jul 16, 2009 1:23 pm

Postby richardk » Thu Jul 16, 2009 2:05 pm

Or
Code: Select all
Options +FollowSymLinks

RewriteEngine On

RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^([^/]+)\.html$ /search.php?query=$1&results=20&search=1 [QSA,L]
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am


Return to Beginner's Corner

Who is online

Users browsing this forum: No registered users and 32 guests

cron