Convert .htaccess to urlrewrite.xml + Word Press Pretty Permalinks

62 views
Skip to first unread message

Sam

unread,
Nov 4, 2011, 6:06:52 PM11/4/11
to UrlRewrite
Hi,
can someone please help me to convert the .htaccess conf below to
urlrewrite.xml?

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

# END WordPress

I have been trying this for several days and I just can't get it
right.

Seriously hope someone can help.

Thanks!

David Mulder

unread,
Jan 4, 2012, 9:17:00 AM1/4/12
to urlre...@googlegroups.com
Take a look at
<rule>
<name>filenamecheck</name>
<condition type="request-filename" operator="isfile"/>
<from>/check-uw-config-exists.txt</from>
<set name="test1">file exists!!!</set>
<to>/test-set.jsp</to>
</rule>
The rest should be quite straightforward, right? (As you probably don't want RewriteCond %{REQUEST_FILENAME} !-d , as it will only allow directory listning etc.)

 

Hope this helps, David Mulder

Robert

unread,
Feb 16, 2012, 1:38:27 PM2/16/12
to UrlRewrite
I tried this solution as I have a similar problem but I can't get it
to work :(

Here is the rule I created;

<rule>
<condition type="request-filename" operator="notfile"/>
<from>/index2.htm</from>
<to>/index.htm</to>
</rule>

so that rule should only be triggered if /index2.htm is not a file -
however the rule seems to just get ignored.

If I create an index2.htm it displays it, if I delete it (not a file)
then I just get a generic 404 error. Without the condition it works as
expected.

Also request-filename isn't listed in the urlrewritefilter
documentation as a condition type that can be used? Is it deprecated?

Regards,

Rob

On Jan 4, 2:17 pm, David Mulder

Avlesh Singh

unread,
Feb 17, 2012, 12:33:36 AM2/17/12
to urlre...@googlegroups.com
R
Sent on my BlackBerry® from Vodafone
--
You received this message because you are subscribed to the Google Groups "UrlRewrite" group.
To post to this group, send email to urlre...@googlegroups.com.
To unsubscribe from this group, send email to urlrewrite+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/urlrewrite?hl=en.

Reply all
Reply to author
Forward
0 new messages