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.

Website and Server Administration Forum


You are currently viewing our Website and Server Administration Forum as a guest. Please register to participate.
Login



Reply
How to rewrite dynamic urls in static in .htaccess?
Old 05-12-2012, 04:45 PM How to rewrite dynamic urls in static in .htaccess?
Junior Talker

Posts: 3
Trades: 0
Hi. I have dynamic site. I want to rewrite my urls to becomes more SEO friendly .When I write an article , I have file view . php / id=1. I want to make something like this view . php / 1 / article-title .I searched several articles at the forum but I couldn`t understand how it works. I tried to make this but i can't.
Thank you.
IQlogo is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-12-2012, 05:22 PM Re: How to rewrite dynamic urls in static in .htaccess?
chrishirst's Avatar
Defies a Status

Posts: 43,971
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Quote:
I want to rewrite my urls to becomes more SEO friendly
They aren't

http://www.askapache.com/htaccess/mo...ps-tricks.html
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 05-12-2012, 05:39 PM Re: How to rewrite dynamic urls in static in .htaccess?
Junior Talker

Posts: 3
Trades: 0
No. I want to replace for example view.php?id=1 with view.php/1/article-title
IQlogo is offline
Reply With Quote
View Public Profile
 
Old 05-12-2012, 05:49 PM Re: How to rewrite dynamic urls in static in .htaccess?
chrishirst's Avatar
Defies a Status

Posts: 43,971
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
And how is .htaccess going to find the article title?
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 05-13-2012, 08:14 AM Re: How to rewrite dynamic urls in static in .htaccess?
Junior Talker

Posts: 3
Trades: 0
I don't know. I just want to rewrite dynamic url in static but I don't know how.
IQlogo is offline
Reply With Quote
View Public Profile
 
Old 05-13-2012, 09:54 AM Re: How to rewrite dynamic urls in static in .htaccess?
chrishirst's Avatar
Defies a Status

Posts: 43,971
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Ok let's get this in the right order.

You do NOT re-write "dynamic" URLs to "static looking" ones. It is actually the other way around.

The "static" alias is redirected internally to the REAL URL that delivers the content.

User agents make a HTTP request to the server for
HTML Code:
site.tld/this-is-a-static-looking-address/
, the server loads and reads the .htaccess (shorthand for hyper text access) conditions and rules then "instructs" the useragent to make another HTTP request for the actual URL and sends a HTTP response code for the real URL to the user agent.

.htaccess has no means of reading the documents to determine what the "title" is, your site navigation has to output the alias (friendly name) then your htaccess rules have to "know" how to re-request the true URL.


You need to read up on mod_alias directives, mod_rewrite directives and Apache's tutorial on htaccess
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?

Last edited by chrishirst; 05-13-2012 at 09:58 AM..
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to How to rewrite dynamic urls in static in .htaccess?
 

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.20740 seconds with 11 queries