View Full Version : Mod_Rewrite help
ninnypants
07-07-2009, 02:06 AM
I'm trying to create pretty urls but I get a 500 error now that I have added this to my .htaccess
RewriteRule ^(.*listing/)([^/]) $1?company_slug=$2
Would this work? (ie. url = http://www.stieurl.com/listing/this-company/ , $1 = http://www.stieurl.com/listing/ , and $2 = this-company)
tomws
07-07-2009, 02:53 AM
Do you intend to have it pointing at this?
http://www.stieurl.com/listing/?company_slug=this-company
ninnypants
07-07-2009, 02:55 AM
yeah I've tried changing it up a little I now have
RewriteRule ^(.*listing/)?([a-z-_0-9])($|/) $1?company_slug=$2
ninnypants
07-07-2009, 07:22 AM
This is a strange question but can you mod rewrite a url that needs to be mod rewritten to work in the first place? I figure I would be able to, but wordpress keeps giving me a 404 error.
tomws
07-08-2009, 06:53 PM
I don't understand the question. Have an example?
ninnypants
07-08-2009, 07:07 PM
I fixed it last night I needed to add [L,R=301] and it started working not quite how I wanted but that's ok.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.