Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,254
Total Threads: 80,792
Total Posts: 566,472
There are 1795 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     HTML/XHTML/DHTML/CSS :

mod-rewrite .htaccess

Thread title: mod-rewrite .htaccess
Closed Thread    
    Thread tools Search this thread Display Modes  
12-08-2005, 04:33 AM
#1
Dan is offline Dan
Dan's Avatar
Status: Request a custom title
Join date: Feb 2005
Location:
Expertise:
Software:
 
Posts: 3,164
iTrader: 15 / 86%
 

Dan is an unknown quantity at this point

  Old  mod-rewrite .htaccess

Thanks for viewing,

I'd like to make all my links "http://www.", so if someone were to type "www." or "http://" or even "webpage.com" - they will all auto change to "http://www."

My knowledge with this is poor, so any help is very much appreicated.

12-08-2005, 04:55 AM
#2
iisbum is offline iisbum
iisbum's Avatar
Status: Member
Join date: Oct 2005
Location: Clifton Park, NY, USA
Expertise:
Software:
 
Posts: 273
iTrader: 4 / 100%
 

iisbum is on a distinguished road

  Old

I have a .htaccess file in the root of my website that looks something like this:

PHP Code:
RewriteEngine on
RewriteCond 
%{HTTP_HOST} ^webpage\.com
RewriteRule 
(.*) http://www.webpage.com/$1 [R=301,L] 
HTH,
Mubs

12-08-2005, 05:17 AM
#3
Dan is offline Dan
Dan's Avatar
Status: Request a custom title
Join date: Feb 2005
Location:
Expertise:
Software:
 
Posts: 3,164
iTrader: 15 / 86%
 

Dan is an unknown quantity at this point

  Old

Thanks i'll try it

12-08-2005, 05:25 AM
#4
Dan is offline Dan
Dan's Avatar
Status: Request a custom title
Join date: Feb 2005
Location:
Expertise:
Software:
 
Posts: 3,164
iTrader: 15 / 86%
 

Dan is an unknown quantity at this point

  Old

Onto my other question,

I have these links that output like so:
http://www.webpage.com/tutorials/tu...hp?id=9_0_7_0_C

I'd like to keep the urls simple, so...
http://www.webpage.com/tutorials/9_0_7_0_C/

How would i go about doing this?

PS. Thanks for any help in advance.

12-08-2005, 05:47 AM
#5
iisbum is offline iisbum
iisbum's Avatar
Status: Member
Join date: Oct 2005
Location: Clifton Park, NY, USA
Expertise:
Software:
 
Posts: 273
iTrader: 4 / 100%
 

iisbum is on a distinguished road

  Old

Try this:


RewriteEngine on
RewriteRule ^tutorials/(.+)/ tutorials/tutorial.php?id=$1
There is a pretty good tutorial for all this stuff at:
http://corz.org/serv/tricks/htaccess2.php

Mubs

12-08-2005, 06:30 AM
#6
Dan is offline Dan
Dan's Avatar
Status: Request a custom title
Join date: Feb 2005
Location:
Expertise:
Software:
 
Posts: 3,164
iTrader: 15 / 86%
 

Dan is an unknown quantity at this point

  Old

Didnt work

12-09-2005, 06:32 PM
#7
Vince4Heisman is offline Vince4Heisman
Status: Sin Binner
Join date: Nov 2005
Location:
Expertise:
Software:
 
Posts: 82
iTrader: 0 / 0%
 

Vince4Heisman is on a distinguished road

  Old

replace + with *

Closed Thread    


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

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed