[wp-hackers] help with rewrite rule
Brian Layman
Brian at TheCodeCave.com
Mon Jun 12 13:17:31 GMT 2006
Stefan:
>This is what my htaccess looks like:
># BEGIN WordPress
><IfModule mod_rewrite.c>
>RewriteEngine On
>RewriteBase /digitalcamera/
>RewriteRule ^camera-selector/([0-9]*)$
wp-content/plugins/interface/interface.php?nm=$1
>RewriteCond %{REQUEST_FILENAME} !-f
>RewriteCond %{REQUEST_FILENAME} !-d
>RewriteRule . /digitalcamera/index.php
></IfModule>
># END WordPress
>Of course this can't work as the page camera-selector does not
>point to a real page and the .php file that is in the second
>part of my rewrite rule does not exist.
You're right on that, but the solution is not to give up on this method
(and even if what you are saying is correct that interface.php does not
exist, this may be helpful). Look into the rewrite rule flags. Those are
the things that you see in brackets [] at the end of the rewrite rule lines
- but you don't have any.
See here: http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html
You probably just need to put a [L] at the end of your first rewrite rule.
That will tell it to stop processing there. What you have right now, since
the camera-selector rule is first is functionally equivalent to a [N].
The line RewriteRule ^camera-selector/([0-9]*)$
wp-content/plugins/interface/interface.php? nm=$1 is supposed to take any
number behind camera-selector (which is a page I created in Wordpress that
uses a custom plugin) and load the interface.php plugin file with the nm
variable attached.
The problem is that as soon as I go to the page
http://www.mysite.com/digitalcamera/camera-selector I only get a blank
window with no code in it.
Any ideas? Is it clashing with any of the following rules?
Thanks guys.
Stefan
_______________________________________________
wp-hackers mailing list
wp-hackers at lists.automattic.com
http://lists.automattic.com/mailman/listinfo/wp-hackers
More information about the wp-hackers
mailing list