Welcome To Snipplr
Everyone's Recent Apache Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
First of all this refers to a clean Ubuntu 10.04 install with the LAMP and OpenSSH packages installed, but can probably be applied in most cases.
Duplicate the file /etc/apaches/sites-available/default, and name it subdomains.
Edit the new file...
1
794
posted 13 years ago by krillzip
Key for code below:
querystring = just the query string. (e.g. url=page)
index = the page that the query string is appended to (e.g. index.php)
domain.com = the domain and page you want to rewrite to
0
853
posted 13 years ago by nielsenrc
When using Joomla, allows you to redirect index.php to the root ( to prevent duplicate content ), without affecting the Joomla admin.
0
718
posted 13 years ago by batfan
"We should always be looking for ways to improve the functionality of our blogs. One of the easiest ways to improve our blog functionality and speed is to leverage browser caching."
1
877
posted 13 years ago by sdxxx
This rewrite covers most mobile devices (with few false positives). When a mobile device is detected it is redirected to /m/.
2
987
posted 13 years ago by ohryan
Tipico caso de sitio con dos dominios, y paginas con parámetros.
0
730
posted 14 years ago by mfigge
Great for developing multiple sites under a wamp install. Removes the headache of paths and domains and changing them when deploying to their live environment.
1
921
posted 14 years ago by Meander365