>> Web >> Customized Htaccess FileLast Updated: 2009/01/21 9:42:27am
Some useful SEO tips and tricks using .htaccess fileMost experienced webmasters will tell you that .htaccess files are really cool. If your site runs on Apache server then try some of these .htaccess command lines... First create a file on your notepad or any text editor called htaccess.txt (since .htaccess is not a common file extensions, your text editor may not allow you to create .htaccess extension). Then go to your documents folder and rename that file to .htaccess. I wrote a detailed google knol on .htaccess file with lot more tips and tricks... make sure you check that out.
301 Redirect flat URLs using .htaccessThis is very handy if your old page has moved and you want search engine credit for that old page passed on to the new page. redirect 301 /MyOldPage.html http://www.EvanIslam.com/MyNewPage.html
301 Redirect Dynamic URLs using .htaccessNow, lets say you have page with php variable. content.php?page=MyOldPage and you want to send that page to MyNewPage.html... you can do that very easily with the following Options +FollowSymLinks RewriteEngine on RewriteCond %{REQUEST_URI} ^/content.php?page=MyOldPage$ [NC] RewriteRule . /MyNewPage.html [R=301]
URL Rewrite for dynamic php variable pagesOkay this is cool for SEO. Lets say you have a page content.php?page=MyNewPage and after much study, it is certain that search engines love FLAT web pages more then get veriable pages such as ?variable=value. So, in this case, we need to transform that content.php?page=MyNewPage TO page-MyNewPage.html. Options +FollowSymLinks RewriteEngine on RewriteRule page-(.*)\.html$ content.php?page=$1
Comment by Jewel Comment by movers Comment by anna you can read more also in an interesting post http://blog.bitlogic.biz/2010/12/seo-some-useful-tips/ Comment by Evan Amit, try this: Options +FollowSymLinks Check this out for more: http://knol.google.com/k/evan-islam/htaccess-tips-and-tricks/2tdhgcs94047p/3# Comment by Amit I have 1 query about rewrite. I want to use http://example.com/1234 instead of http://example.com/index.php?category=1234. How can I do this?? Got any Comments? |
|
|
My Portfolio About Evan
|


