Can I create another page ? I'd like to create a page with a random image which I can then embed as an iframe in another site (my wordpress site which doesn't run on the same machine). Is it possible without changing code in zp ? Or should I do that outside the theme ?
Comments
`anything.php` becomes `/index.php?p=anything`
You can add the following rule to your .htaccess to be able to visit the page from `/page/anything`:
`RewriteRule ^page/([A-Za-z0-9-]+)/?$ index.php?p=$1 [L,QSA]`
This must go UNDER the `RewriteRule ^page/([0-9]+)/?$` line, and will be included in future releases (but isn't in 1.0.3).
Here's my htaccess if you want to take a gander Trisweb:
`
# htaccess file for zenphoto
# NOTE: Change the RewriteBase below to the absolute path to your zenphoto directory.
RewriteEngine On
# !!! Change this to the web path (eg: http://www.example.com/photos --> /photos) !!!
RewriteBase /zenphoto
RewriteCond %{REQUEST_FILENAME} -f [NC,OR]
RewriteCond %{REQUEST_FILENAME} -d [NC]
RewriteRule ^.*$ - [R,L]
RewriteRule ^admin/?$ zen/admin.php [R,L]
RewriteRule ^page/([0-9]+)/?$ index.php?page=$1 [L,QSA]
RewriteRule ^page/([A-Za-z0-9-_]+)/?$ index.php?p=$1 [L,QSA]
RewriteRule ^([^/]+)\.([a-z]+)$ index.php?album=$1&format=$2 [L,QSA]
RewriteRule ^([^/]+)/?$ index.php?album=$1 [L,QSA]
RewriteRule ^([^/]+)/slideshow/?$ index.php?album=$1&view=Slideshow [L,QSA]
RewriteRule ^([^/]+)/page/(all)/?$ index.php?album=$1&displaythumbs=All [L,QSA]
RewriteRule ^([^/]+)/page/([0-9]+)/?$ index.php?album=$1&page=$2 [L,QSA]
RewriteRule ^([^/]+)/image/(thumb|[0-9]{1,4})/([^/\\]+)$ zen/i.php?a=$1&i=$3&s=$2 [L,QSA]
RewriteRule ^([^/]+)/image/([^/\\]+)$ albums/$1/$2 [L]
RewriteRule ^([^/]+)/([^/\\]+)$ index.php?album=$1&image=$2 [L,QSA]
`
header ('Content-Type: text/xml');
And it works.
Guess it didn't like the application/rss+xml header type for some reason...
What is that supposed to do in the rewrite rule?
Thanks Trisweb.