Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Search Engine Friendly Links-How Do I Do It?
Old 01-21-2008, 01:58 PM Search Engine Friendly Links-How Do I Do It?
andyp's Avatar
Extreme Talker

Posts: 165
Name: andy patterson
Trades: 0
ok, On My Site The Links Are Displayed as

article.php?id=34 or index.php?category=photoshop etc.

But I Want To Make The Links Like;

index/category/photoshop or article/id/34

Any Ideas?
andyp is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-21-2008, 03:13 PM Re: Search Engine Friendly Links-How Do I Do It?
dansgalaxy's Avatar
Defies a Status

Posts: 6,521
Name: Dan
Location: Swindon
Trades: 0
htacess using Apache's Mod_Rewrite.

i cant provide exact code, but basically it involvs adding some bits to your .htacess file.

bare in mind that all urls must be full other wise u will end up with a ton of 404 and missing images


try looking at some of these:

http://www.geekpedia.com/tutorial166...d-rewrite.html

and this: http://www.devshed.com/c/a/Apache/Se...h-mod-rewrite/
__________________
Discounted Web Hosting With XDnet!
>> Get 25% of hosting~ Promo: Webmaster-talk <<

Please login or register to view this content. Registration is FREE
dansgalaxy is offline
Reply With Quote
View Public Profile Visit dansgalaxy's homepage!
 
Old 01-21-2008, 03:26 PM Re: Search Engine Friendly Links-How Do I Do It?
andyp's Avatar
Extreme Talker

Posts: 165
Name: andy patterson
Trades: 0
What Do You Mean All Links Must Be Full? Do You Mean Absoulte Linking Instead Of Relative?
Does Google Work With They Style Of Links Or Does It Not Understand The ? mark?.

Last edited by andyp; 01-21-2008 at 03:30 PM..
andyp is offline
Reply With Quote
View Public Profile
 
Old 01-21-2008, 03:30 PM Re: Search Engine Friendly Links-How Do I Do It?
dansgalaxy's Avatar
Defies a Status

Posts: 6,521
Name: Dan
Location: Swindon
Trades: 0
yea sorry couldnt remember the word.

its because if you convert page.php?pg=45 to page/45/ the server can understand its not really in a folder but the browser dont so when it sees a url to images/pic.jpg then it will try to get it from page/45/images/pic.jpg

Do you get what i mean?

Hope this helps

TP apprieciated
__________________
Discounted Web Hosting With XDnet!
>> Get 25% of hosting~ Promo: Webmaster-talk <<

Please login or register to view this content. Registration is FREE
dansgalaxy is offline
Reply With Quote
View Public Profile Visit dansgalaxy's homepage!
 
Old 01-21-2008, 05:13 PM Re: Search Engine Friendly Links-How Do I Do It?
maxxximus's Avatar
Extreme Talker

Posts: 219
Name: Rob
Location: UK
Trades: 0
If you add this to your existing .htaccess in the root directory it should do the trick.

Code:
 RewriteEngine On
RewriteRule ^(.*)/(.*)/(.*) $1.php?$2=$3
Its more a remap than rewrite. It maps any match in the first half of the rule with an existing URL. Using the rule above 'index/category/photoshop' will map to 'index.php?category=photoshop'.

As said all you source URLs will need rewriting - images, css files etc. If they're all in the root directory then simply adding a / at the beginning should sort it. 'css/style.css' would become '/css/style.css'
maxxximus is offline
Reply With Quote
View Public Profile
 
Old 01-22-2008, 11:09 AM Re: Search Engine Friendly Links-How Do I Do It?
andyp's Avatar
Extreme Talker

Posts: 165
Name: andy patterson
Trades: 0
cheers For That,
Does Every Link For That Site Have To Be Absolute Or Can I Make Some Relative?.
Does Linking This Way Increase Security?.

Last edited by andyp; 01-22-2008 at 11:11 AM..
andyp is offline
Reply With Quote
View Public Profile
 
Old 01-22-2008, 11:41 AM Re: Search Engine Friendly Links-How Do I Do It?
dansgalaxy's Avatar
Defies a Status

Posts: 6,521
Name: Dan
Location: Swindon
Trades: 0
technically no but theres no benifit to it.

no not really, BUT if u have absolute and someone nicks ur page it means you can get the link backs etc from it and can more easily find who did the nickin (if ur worried )
__________________
Discounted Web Hosting With XDnet!
>> Get 25% of hosting~ Promo: Webmaster-talk <<

Please login or register to view this content. Registration is FREE
dansgalaxy is offline
Reply With Quote
View Public Profile Visit dansgalaxy's homepage!
 
Old 01-22-2008, 01:20 PM Re: Search Engine Friendly Links-How Do I Do It?
andyp's Avatar
Extreme Talker

Posts: 165
Name: andy patterson
Trades: 0
I've Hit A Problem, My CSS wont work!
<link href="/template/themes/style.css" rel="stylesheet" type="text/css">
thats what i have got for my linking to ap-gfx.com/index it wont display as soon as i changed the linking style to the above how do i fix it.
andyp is offline
Reply With Quote
View Public Profile
 
Old 01-22-2008, 03:04 PM Re: Search Engine Friendly Links-How Do I Do It?
dansgalaxy's Avatar
Defies a Status

Posts: 6,521
Name: Dan
Location: Swindon
Trades: 0
try a abslute to see if it works

Dan
__________________
Discounted Web Hosting With XDnet!
>> Get 25% of hosting~ Promo: Webmaster-talk <<

Please login or register to view this content. Registration is FREE
dansgalaxy is offline
Reply With Quote
View Public Profile Visit dansgalaxy's homepage!
 
Reply     « Reply to Search Engine Friendly Links-How Do I Do It?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.84620 seconds with 12 queries