Forums
This topic is locked
.htaccess file for Search Engine Friendly URL's
Posted 06 Oct 2005 08:50:44
1
has voted
06 Oct 2005 08:50:44 Tracy Sweder posted:
Hello,I am trying to create a .htaccess file that will rewrite my php URL's into something more search engine friendly. I've tried several different variations (examples below) but I either end up with an error page when I load my site - or my site loads fine but the URL's in the browser are still the php URL's and haven't been re-written.
My host tells me this feature is enabled on my server. I am creating the files in Notepad, saving them as htaccess.txt - uploading them via FTP in ASCII mode, and then renaming them through FTP to .htaccess. If someone could look at the various attempts I've made and maybe let me know where I'm going wrong it would be greatly appreciated <img src=../images/dmxzone/forum/icon_smile_big.gif border=0 align=middle>
The website is located at: www.tilaru.com
Examples of the .htaccess files I've tried are:
RewriteEngine on
RewriteRule ^details([^.]+).*$ /details.php?item=$1 [NC,L]
RewriteRule ^ornamental_gallery([^.]+).*$ /ornamental_gallery.php?type=$1 [NC,L]
RewriteRule ^blade_gallery([^.]+).*$ /blade_gallery.php?type2=$1 [NC,L]
RewriteRule ^jewelry_gallery([^.]+).*$ /jewelry_gallery.php?type2=$1 [NC,L]
RewriteEngine on
RewriteRule ^details/(.*).html$ /details.php?item=$1 [NC,L]
RewriteRule ^ornamental_gallery/(.*).html$ /ornamental_gallery.php?type=$1 [NC,L]
RewriteRule ^blade_gallery/(.*).html$ /blade_gallery.php?type2=$1 [NC,L]
RewriteRule ^jewelry_gallery/(.*).html$ /jewelry_gallery.php?type2=$1 [NC,L]
RewriteEngine on
RewriteRule ^/([^.]+).*$ details.php?item=$1 [T=application/x-httpd-php]
RewriteRule ^/([^.]+).*$ ornamental_gallery.php?type=$1 [T=application/x-httpd-php]
RewriteRule ^/([^.]+).*$ blade_gallery.php?type2=$1 [T=application/x-httpd-php]
RewriteRule ^/([^.]+).*$ jewelry_gallery.php?type2=$1 [T=application/x-httpd-php]
RewriteEngine on
RewriteBase /
RewriteRule ^item([^.]+).*$ details.php?item=$1 [T=application/x-httpd-php]
RewriteRule ^type([^.]+).*$ ornamental_gallery.php?type=$1 [T=application/x-httpd-php]
RewriteRule ^type2([^.]+).*$ blade_gallery.php?type2=$1 [T=application/x-httpd-php]
RewriteRule ^type2([^.]+).*$ jewelry_gallery.php?type2=$1 [T=application/x-httpd-php]
Options +FollowSymLinks
RewriteEngine on
RewriteRule ^item/([^.]+)$ details/item/$1/ [R]
RewriteRule ^item/([^.]+)/$ details.php?item=$1
RewriteRule ^type/([A-Za-z]+)$ ornamental_gallery/type/$1 [R]
RewriteRule ^type/([A-Za-z]+)/$ ornamental_gallery.php?type=$1
RewriteRule ^type2/([A-Za-z]+)$ blade_gallery/type2/$1/ [R]
RewriteRule ^type2/([A-Za-z]+)/$ blade_gallery.php?type2=$1
RewriteRule ^type2/([A-Za-z]+)$ jewelry_gallery/type2/$1/ [R]
RewriteRule ^type2/([A-Za-z]+)/$ jewelry_gallery.php?type2=$1
Options +FollowSymLinks
RewriteEngine on
RewriteRule articles/([0-9]+?)$ /details.php?item=$1
RewriteRule articles/([0-9]+?)$ /ornamental_gallery.php?type=$1
RewriteRule articles/([0-9]+?)$ /blade_gallery.php?type2=$1
RewriteRule articles/([0-9]+?)$ /jewelry_gallery.php?type2=$1
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
RewriteRule ^productid([^.]+).*$ details.php?item=$1 [T=application/x-httpd-php]
RewriteRule ^productid([^.]+).*$ ornamental_gallery.php?type=$1 [T=application/x-httpd-php]
RewriteRule ^productid([^.]+).*$ blade_gallery.php?type2=$1 [T=application/x-httpd-php]
RewriteRule ^productid([^.]+).*$ jewelry_gallery.php?type2=$1 [T=application/x-httpd-php]
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
RewriteRule ^details([^.]+).*$ details.php?item=$1 [T=application/x-httpd-php]
RewriteRule ^ornamental_gallery([^.]+).*$ ornamental_gallery.php?type=$1 [T=application/x-httpd-php]
RewriteRule ^blade_gallery([^.]+).*$ blade_gallery.php?type2=$1 [T=application/x-httpd-php]
RewriteRule ^jewelry_gallery([^.]+).*$ jewelry_gallery.php?type2=$1 [T=application/x-httpd-php]
Thank you,
MommaTC
Replies
Replied 23 Jul 2008 12:16:58
23 Jul 2008 12:16:58 hamuk beni replied:
you shuld read the apache manual for htaccess here.
------<font size=1>
freepedia.co.il
www.free-css.co.il
www.projectors.co.il
</font id=size1>
Edited by - banana1 on 23 Jul 2008 12:20:20
------<font size=1>
freepedia.co.il
www.free-css.co.il
www.projectors.co.il
</font id=size1>
Edited by - banana1 on 23 Jul 2008 12:20:20