.htaccess - Mod_write, htaccess and Wordpress slugs -
this either blindingly simple or impossible; after lots of googling , thread reading, can't tell.
i have wordpress site uses plugin create custom post type. rub of custom post type has ugly "slug". means urls this:
http://mysite.org/uglyname/a-post-title/
where "uglyname" ugly name. can't change name without editing core files of plugin, bad idea in context.
what i'd make if user visits url this:
http://mysite.org/prettyname/a-post-title/
wordpress interprets prettyname uglyname , more or less nonethewiser.
i don't want redirects; i'd silent mapping. keep in mind wordpress using .htaccess file map gets onto http://mysite.org/index.php.
is possible, or barking wrong tree?
edit add: current .htaccess wordpress default:
# begin wordpress <ifmodule mod_rewrite.c> rewriteengine on rewritebase /mysite.org/ rewriterule ^index\.php$ - [l] rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule . /mysite.org/index.php [l] </ifmodule> # end wordpress
just above rewritecond %{request_filename} !-f
, try following line:
rewriterule ^prettyname/(.+)/? /uglyname/$1
if i'm not mistaken, should pass over, , still process index.php
routing.
haven't tested - not @ server right now.
Comments
Post a Comment