Forum Moderators: phranque
More information here: Changing Dynamic URLs to Static URLs - A guide to Search engine-friendly links with mod_rewrite. [webmasterworld.com]
Jim
RewriteCond %{HTTP_HOST}!^subdomain\.example\.com$ [NC]
RewriteRule ^/([a-z]+)/(([a-z]+)/([0-9]+),([0-9]+),([0-9]+)-keyword\.htm$ [subdomain.example.com...] [R=301,L]
But it give me 500 error
help me pls
You may need to precede your code with the two lines shown below, as well as escaping the commas:
Options +FollowSymLinks
RewriteEngine on
#
RewriteCond %{HTTP_HOST} !^subdomain\.example\.com [NC]
RewriteRule ^([a-z]+)/(([a-z]+)/([0-9]+)\,([0-9]+)\,([0-9]+)-keyword\.htm$ /index.php?b=$5&a=$4&l=$3&d=$2&w=$1 [L]
that's .htaccess content :
Options +FollowSymlinks
RewriteEngine On
RewriteBase /
RewriteRule -p([0-9]*)-([0-9]+)\.html$ /index.php?cat_id=$2&page=$1 [L]
RewriteRule -k[0-9]*-([0-9]+)\.html$ /search.php?action=seek&mots=id$1&nb_results2show=20&booleen=AND [L]
RewriteRule ^fr/.+/([^/]+\.html)$ /fr/$1 [R=301,L]
RewriteRule [.]*-vf([0-9]*) /fr/viewforum.php?%{QUERY_STRING}&f=$1
RewriteRule [.]*-vp([0-9]*) /fr/viewtopic.php?%{QUERY_STRING}&p=$1
RewriteRule [.]*-vt([0-9]*) /fr/viewtopic.php?%{QUERY_STRING}&t=$1
RewriteRule [.]*-vc([0-9]*) /fr/index.php?%{QUERY_STRING}&c=$1
RewriteRule [.]*-ac([0-9]*) /fr/album_cat.php?%{QUERY_STRING}&cat_id=$1
RewriteRule [.]*-at([0-9]*) /fr/album_thumbnail.php?%{QUERY_STRING}&pic_id=$1
RewriteRule [.]*-apic([0-9]*) /fr/album_pic.php?%{QUERY_STRING}&pic_id=$1
RewriteRule [.]*-apm([0-9]*) /fr/album_picm.php?%{QUERY_STRING}&pic_id=$1
RewriteRule [.]*-full-asp([0-9]*) /fr/album_showpage.php?full=&pic_id=$1
RewriteRule [.]*-asp([0-9]*) /fr/album_showpage.php?%{QUERY_STRING}&pic_id=$1
RewriteRule [.]*-aper([0-9]*) /fr/album_personal.php?%{QUERY_STRING}&user_id=$1
RewriteRule [.]*-dc([0-9]*) /fr/dload.php?%{QUERY_STRING}action=category&cat_id=$1
RewriteRule [.]*-df([0-9]*) /fr/dload.php?%{QUERY_STRING}action=file&file_id=$1
RewriteRule [.]*-kbc([0-9]*) /fr/kb.php?%{QUERY_STRING}mode=cat&cat=$1
RewriteRule [.]*-kba([0-9]*) /fr/kb.php?%{QUERY_STRING}mode=article&k=$1
RewriteRule [.]*-kbsmp /fr/kb.php?mode=stats&stats=mostpopular
RewriteRule [.]*-kbstr /fr/kb.php?mode=stats&stats=toprated
RewriteRule [.]*-kbsl /fr/kb.php?mode=stats&stats=latest
RewriteRule [.]*-pbc([0-9]*) /fr/kb.php?%{QUERY_STRING}mode=cat&cat=$1
RewriteRule [.]*-pa([0-9]*) /fr/kb.php?%{QUERY_STRING}mode=article&k=$1
RewriteRule [.]*-psmp /fr/kb.php?mode=stats&stats=mostpopular
RewriteRule [.]*-pstr /fr/kb.php?mode=stats&stats=toprated
RewriteRule [.]*-pbsl /fr/kb.php?mode=stats&stats=latest
RewriteRule -t([0-9]+)-([0-9]+)\.htm$ /processus.php?m=$2&t=$1 [L]
RewriteRule -a([0-9]+)\.htm$ /actualites.php?a=$1 [L]
RewriteCond %{HTTP_HOST} !^subdomain\.domain\.com [NC]
RewriteRule ^([a-z]+)/([a-z]+)/([0-9]+)\,([0-9]+)\,([0-9]+)-keyword\.htm$ /index.php?b=$5&a=$4&l=$3&d=$2&w=$1 [L]
there's an error or loop in my .htaccess?
and think you very much :)