Payday Loan Affiliate Network
Home Sign Up for a Payday Loan Payday Loan Blog
Apply for your payday loan today and get approved for up to $1000.

How Our Program Works
Frequently Asked Questions

Payday Loans
Affiliate Marketing
Coding
Content
Design
SEO


Add This Blog to your Technorati Favorites
Subscribe to our RSS Feed
 

Payday Loan Blog - Query String Stripper

 
 Wednesday, 08 November 2006

Sorry, no scantily clad girl (or guy, if that's your thing) dancing for you in this post. Just some tech geekery.

In my previous post on duplicate content issues, I mentioned that I didn't have a solution for eliminating query strings from URLs. I've found the solution. It's in the mod_rewrite documentation. I just wasn't looking in the right place. I kicked myself after I discovered it. It's simple. Now for the code:

RewriteCond %{QUERY_STRING}  ^.+$ [NC]
RewriteRule (.*) http://www.example.com/$1? [R=301,L]

This will take any link that contains a query string, remove the query string and 301 redirect to the intended page.  This is handy for the cases where the search engines find some random link on the web that contains a query string.  Even if your site has never used query strings, sometime links like that will be out there.

-Jon K.


Wednesday, 08 November 2006 16:48:31 (US Mountain Standard Time, UTC-07:00)  #     
 | 
 

Call Toll-Free Now! 855-371-8009