PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
RewriteEngine On
RewriteBase /photos
RewriteRule ^photos/(.*)$ page.php?$u=1
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
RewriteEngine On
RewriteBase /
RewriteRule ^([a-zA-Z0-9_-]+)(/)?$ /albums.php?u=$1
Works. However, all of my links are acting as if the page is in the photos/ dir. IE what should be domain.com/page.php is now domain.com/photos/page.php .. Is it possible to make it so it doesn't do that =/
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
The issue is not with mod_rewrite, it is with your browser and is expected behaviour.
It's your broswer that works out any relative linking. You have to remember that as far as your browser is concerned it's looking at yoursite.com/photos
As a result any relative links on your page will be assumed (quite rightly) to have a base of yoursite.com/photos.
dunno if this helps but I found slapping <BASE href="http://www.mysite.com"> at the top of the page sorts out bugs with links that should be from top level rather than a rewritten address.
thanks, the BASE HREF sorted things out nicely. now will this cause a problem if I throw it in my header file (thats included on all pages)
I don't have any other directories other than the main one (that pages are in anyways)
I just want to be cautious =)
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.