Forum Moderators: phranque

Message Too Old, No Replies

Rewriting (via htaccess) from directory to page not being applied

is wordpress the issue?

         

geckofuel

3:48 pm on Jul 17, 2007 (gmt 0)

10+ Year Member



Ok. So I'm trying to do a simple htaccess rewrite from the directory /display/theme-name/ to the page /themes/sample-theme/?wptheme=SampleTheme

Unfortunately, this is being done on a site with WordPress installed in the root directory and I know that there can be problems with this combination. Any suggestions for getting the rewrite rule to work are appreciated.

########################################
Options +FollowSymLinks

RewriteEngine On

RewriteRule /display/theme-name/ /themes/sample-theme/?wptheme=SampleTheme

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME}!-f
RewriteCond %{REQUEST_FILENAME}!-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress
########################################

jdMorgan

11:40 pm on Jul 17, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



In .htaccess, there's no leading slash on URL-paths 'seen' by RewriteRule:

RewriteRule [b]^di[/b]splay/theme-name/$ /themes/sample-theme/?wptheme=SampleTheme [L]

Jim