Browsed by
Tag: apache2

Apache2 Rewritemap

Apache2 Rewritemap

I love apache mod_rewrite. I often fight with it, but if you really want it you can do whatever you want. This time I wanted to find a way to call a file named after the called subdomain. I have a website called www.yellow-sub.net, and there is some subdomains like the-beatles.yellow-sub.net, john-lennon.yellow-sub.net and so on for each part of the website (That’s a SEO consideration in the beginning). I have only one virtual host for that website because I find…

Read More Read More

Apache2 mod_rewrite and %{REQUEST_FILENAME}

Apache2 mod_rewrite and %{REQUEST_FILENAME}

I’m trying to develop a new website to increase my php object oriented skills. For this new website, I want every request for any url that doesn’t match a actual file on the disk to be redirected to index.php (to handle parameters in fact). Easy with apache2 rewrite rules :          RewriteCond %{REQUEST_FILENAME} !-f          RewriteCond %{REQUEST_FILENAME} !-d          RewriteCond %{REQUEST_FILENAME} !-l                  …

Read More Read More

a1d7ecd6c17cf21775bf60a342383defJJJJJJJJJJJJJJJJJJJJJ