Google Optimization
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   SEO Chat ForumsGoogleGoogle Optimization

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread SEO Chat Forums Sponsor:
  #1  
Old April 30th, 2008, 01:52 AM
theschtickler theschtickler is offline
Registered User
SEO Chat Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 2 theschtickler User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 24 m 13 sec
Reputation Power: 0
Newbie question - URL rewrite

Hi there,

I've had a llok thru a lot of forums, but can't seem to find the answer to this one...

So, correct me if I'm wrong, but my site will rank better with non-php URLs, so I am trying to implement a URL rewrite. This is the code I have put in my htaccess file:

Options +FollowSymLinks
RewriteEngine on
RewriteRule artist-name-(.*)\.htm$ artist.php?name=$1


with my php url being:
/artist.php?name=Mr%20Jones

My first issue seems to be that the rewrite doesnt seem to work. I have PHP 5.2.4, running on an apache 1.3.41 server, anyone got any ideas? No clues where to start....

Thanks

Reply With Quote
  #2  
Old April 30th, 2008, 06:37 AM
NavyCS's Avatar
NavyCS NavyCS is offline
Contributing User
SEO Chat Novice (500 - 999 posts)
 
Join Date: Jan 2006
Location: Bartlett, TN
Posts: 797 NavyCS User rank is Sergeant (500 - 2000 Reputation Level)NavyCS User rank is Sergeant (500 - 2000 Reputation Level)NavyCS User rank is Sergeant (500 - 2000 Reputation Level)NavyCS User rank is Sergeant (500 - 2000 Reputation Level)NavyCS User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 3 Weeks 2 Days 21 h 11 m 9 sec
Reputation Power: 12
I'll take a stab at it - you need to provide a rewrite condition before a rule can be applied - maybe something like;

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_URI} ^.*artist\.php
RewriteCond %{QUERY_STRING} ^a=([^&]+)$
RewriteRule ^.*$ /artist-name/%1.html [R=301,L]

*crosses fingers*
Comments on this post
Spaggie agrees: Awarded for Bravery
__________________
Keyword Meta Questions Answered
HTAccess Redirects

Adversity is a spice when added to life makes the dish more interesting.

A magic marker is a SEO's "Easy Button".

Reply With Quote
  #3  
Old April 30th, 2008, 07:33 PM
theschtickler theschtickler is offline
Registered User
SEO Chat Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 2 theschtickler User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 24 m 13 sec
Reputation Power: 0
Nah, still no love

Anything else I might try?

Reply With Quote
  #4  
Old May 1st, 2008, 08:08 AM
jbr jbr is offline
Registered User
SEO Chat Newbie (0 - 499 posts)
 
Join Date: Jul 2006
Posts: 5 jbr User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 44 m 11 sec
Reputation Power: 0
Small change

Try this one:

Options +FollowSymLinks
RewriteEngine on
RewriteRule artist-name-([^/]+)\.htm$ artist.php?name=$1

.* should work, too, but sometimes I have better luck with this.

Also keep in mind that they goal is not to get rid of .php. Search engines don't mind that stuff. But you want to keep the query parameters low and, more importantly, have keywords in you URL. And that's what this should help you with. But you could leave the .php instead of replacing it with .htm.

Also, do you know for a fact that the rewrite engine is working? Do you see activity in the rewrite log? I think you have it turned off, so you may want to add "RewriteLogLevel 3" to this and check the log.

Reply With Quote
  #5  
Old May 8th, 2008, 11:26 PM
EReilly EReilly is offline
Contributing User
SEO Chat Newbie (0 - 499 posts)
 
Join Date: Feb 2008
Location: Cambridge, Massachusetts
Posts: 40 EReilly User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 59 m 23 sec
Reputation Power: 1
Yeah, that should work.

Reply With Quote
Reply

Viewing: SEO Chat ForumsGoogleGoogle Optimization > Newbie question - URL rewrite


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway