Here’s my htaccess file at the moment:
Options +FollowSymLinks
RewriteEngine On
RewriteBase /blog/
ErrorDocument 404 /blog/404.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)\.html$ post.php/$1.html
RewriteRule ^index$ index.php
RewriteRule ^archives$ archives.php
RewriteRule ^about$ about.php
RewriteRule ^search$ search.php
RewriteRule ^feed$ feed.php
At the moment if I go to domain.com/blog/*.html, it is redirecting (in the background) to domain.com/blog/post.php/*
I would like to almost copy this but I’m not sure about all this regular expression stuff.
I would like to be able to also go to domain.com/blog/admin/* and for it to redirect (in the background) to domain.com/blog/admin.php?p=*
If you guys could help me out, I would really appreciate it!
Thanks
Something like:
Will do the trick.
This is done very quickly and it isn’t tested but it gives you the idea. You put this above:
Edit: Took out the rewritecond since I just realised it is useless
Edit: Added query string too since you are actually converting the _GET now.