|
|
|
|
Thread title: Mod_rewrite Help |
|
|
|
|
|
Thread tools
Search this thread
Display Modes
|
|
02-11-2007, 09:23 PM
|
#1
|
Status: Dediport Hosting
Join date: Jul 2006
Location: Berkshire
Expertise: programming, business
Software: Dreamweaver
Posts: 1,316
|
Mod_rewrite Help
Hi,
I am not very good at mod rewrite and could someone give me the code for these to?
And..
Thanks
Steven
|
|
02-11-2007, 09:31 PM
|
#2
|
Status: Senior Member
Join date: Jan 2006
Location: USA
Expertise:
Software:
Posts: 922
|
Try This, im not positive though
RewriteEngine On
RewriteRule ^(.*)/out/$ out.php?id=$1
RewriteRule ^(.*)/efefcts/ effects.php
|
|
02-11-2007, 09:36 PM
|
#3
|
Status: Dediport Hosting
Join date: Jul 2006
Location: Berkshire
Expertise: programming, business
Software: Dreamweaver
Posts: 1,316
|
Ok, If someone could confirmit would be great.
|
|
02-12-2007, 03:11 AM
|
#4
|
Status: Senior Member
Join date: Jan 2006
Location: USA
Expertise:
Software:
Posts: 922
|
|
|
02-12-2007, 03:36 AM
|
#5
|
Status: Request a custom title
Join date: Dec 2005
Location: Arizona
Expertise:
Software:
Posts: 5,200
|
Instead, just use this and it will work for every file.
RewriteEngine On
RewriteRule ^out/(.*)/$ out.php?id=$1 [L]
RewriteRule ^effects/ effects.php [L]
His code was a little *bleh*.
|
|
02-12-2007, 07:01 AM
|
#6
|
Status: Dediport Hosting
Join date: Jul 2006
Location: Berkshire
Expertise: programming, business
Software: Dreamweaver
Posts: 1,316
|
Cheers Andrew, The first one looks fine, For the second one is there a way I can make it work with others so text-correction.php would be /text-correction/ and text-effects.php will be /text-effects/, and effects.php as /effects/ . Or is it best to write a seperate rule for all 10 of them?
|
|
02-12-2007, 08:41 AM
|
#7
|
Status: We're all mad here
Join date: Aug 2005
Location: Missouri
Expertise: programming
Software: Notepad
Posts: 1,606
|
RewriteRule ^([-_a-zA-Z0-9]+)/$ $1.php [L]
that would cover the characters (hyphen, underscore, a-z, A-Z, 0-9)
|
|
|
|
|
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
|