NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page Changing URL's to be SE friendly

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 01-31-2007, 12:43 AM THREAD STARTER               #1 (permalink)
NamePros Regular
Join Date: Jun 2005
Location: Michigan
Posts: 613
combs84 is just really nicecombs84 is just really nicecombs84 is just really nicecombs84 is just really nice
 



Changing URL's to be SE friendly


I own www.sportstix.us I am havig a new ticket site created like it but with a much better custom design rather than a template.

The thing i hate tho is how the destinations go to http://sportstix.us/ResultsGeneral.a...etroit+Pistons
????: NamePros.com http://www.namepros.com/programming/288340-changing-urls-to-be-se-friendly.html
or
http://sportstix.us/ResultsEvent.asp...ina%20Aguilera

instead of something like:

http://www.sportstix.com/tickets/det...ns-tickets.htm

Is there a way to do this quickly, affordably, and easily? Anybody want to do it at a cost? Or is it easy for me to do? What do I change?
combs84 is offline  
Old 01-31-2007, 01:05 AM   #2 (permalink)
NamePros Regular
 
beaver6813's Avatar
Join Date: May 2005
Location: England
Posts: 392
beaver6813 is a jewel in the roughbeaver6813 is a jewel in the roughbeaver6813 is a jewel in the rough
 




You use a tool in apache called mod_rewrite. Basically in the .htaccess file you specify what it should look for in the url and then convert this behind the scenes to what you want... kinda like a mask.

I reccomend these tutorials:
http://www.sitepoint.com/article/guide-url-rewriting
http://www.yourhtmlsource.com/sitema...rewriting.html

Have fun!
beaver6813 is offline  
Old 01-31-2007, 06:37 AM   #3 (permalink)
Senior Member
 
netzilla's Avatar
Join Date: Aug 2005
Posts: 1,717
netzilla is a splendid one to beholdnetzilla is a splendid one to beholdnetzilla is a splendid one to beholdnetzilla is a splendid one to beholdnetzilla is a splendid one to beholdnetzilla is a splendid one to beholdnetzilla is a splendid one to beholdnetzilla is a splendid one to behold
 



I concur that mod_rewrite is the most effective way to go.
netzilla is offline  
Old 01-31-2007, 03:59 PM   #4 (permalink)
Senior Member
 
RegisterRants's Avatar
Join Date: Oct 2006
Location: NJ
Posts: 1,152
RegisterRants has a spectacular aura aboutRegisterRants has a spectacular aura aboutRegisterRants has a spectacular aura about
 




Code:
RewriteEngine On
RewriteRule tickets/detroit-pistons-ticket.htm ResultsGeneral.aspx?stype=0&kwds=Detroit+Pistons
__________________
Web Development
RegisterRants is offline  
Old 02-01-2007, 12:23 AM   #5 (permalink)
NamePros Regular
 
beaver6813's Avatar
Join Date: May 2005
Location: England
Posts: 392
beaver6813 is a jewel in the roughbeaver6813 is a jewel in the roughbeaver6813 is a jewel in the rough
 




A much better way would be:

Code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^tickets/(.*)\.html$ ResultsGeneral.aspx?stype=0&kwds=$1 [L]
</IfModule>
beaver6813 is offline  
Old 02-13-2007, 11:30 AM THREAD STARTER               #6 (permalink)
NamePros Regular
Join Date: Jun 2005
Location: Michigan
Posts: 613
combs84 is just really nicecombs84 is just really nicecombs84 is just really nicecombs84 is just really nice
 



Where do I put these codes?
combs84 is offline  
Old 02-13-2007, 11:39 AM   #7 (permalink)
NamePros Regular
 
beaver6813's Avatar
Join Date: May 2005
Location: England
Posts: 392
beaver6813 is a jewel in the roughbeaver6813 is a jewel in the roughbeaver6813 is a jewel in the rough
 




In the home directory of your site, or wherever the files are located create a file called .htaccess and insert the stuff i've posted into it.
beaver6813 is offline  
Old 02-15-2007, 01:09 PM   #8 (permalink)
NamePros Regular
Join Date: Oct 2003
Location: Sweden
Posts: 395
cerebus has a spectacular aura aboutcerebus has a spectacular aura about
 


Animal Rescue Wildlife Animal Cruelty
Combs84, they all assumed you were using Apache as your webserver. Which you are not.

If you see .asp you can assume its a IIS webserver. It's easily verified by seeing the headers sent by the server - 'Microsoft-IIS/6.0' (web developer toolbar or firebug, anyone?).

Read the comments (and to little extent the original post) at:
http://ask-leo.com/does_iis_support_url_rewriting.html

In short: IIS is capable if you have the access, patience and energy to do some extra work.
cerebus is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Liquid Web Smart Servers  
All times are GMT -7. The time now is 08:03 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger