SSI Variables DATE_GMT=Sun Mar 8 22:58:56 2009 DATE_LOCAL=Sun Mar 8 15:58:56 2009 DOCUMENT_NAME=FOOTER.html DOCUMENT_ROOT=/root-srv/protected/askapache.com/sec DOCUMENT_URI=/includes/FOOTER.html GATEWAY_INTERFACE=CGI/1.1 HTTP_ACCEPT=text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 HTTP_ACCEPT_CHARSET=ISO-8859-1,utf-8;q=0.7,*;q=0.7 HTTP_ACCEPT_ENCODING=gzip,deflate HTTP_ACCEPT_LANGUAGE=en-us,en;q=0.5 HTTP_CACHE_CONTROL=max-age=0 HTTP_CONNECTION=keep-alive HTTP_COOKIE=__qca=12298910-686528-46510; __utmb=50625.1.0.11311 HTTP_HOST=www.askapache.com HTTP_KEEP_ALIVE=300 HTTP_REFERER=http://www.askapache.com/htaccess/htaccess.html HTTP_USER_AGENT=Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.6) Gecko/2009011913 Firefox/3.0.6 (.NET CLR 3.5.30729) LAST_MODIFIED=Sun Mar 8 14:53:50 2009 PATH=/bin:/usr/bin:/sbin:/usr/sbin QUERY_STRING= REMOTE_ADDR=24.123.215.60 REMOTE_PORT=4785 REQUEST_METHOD=GET REQUEST_URI=/htaccess/ SCRIPT_FILENAME=/root-srv/protected/askapache.com/sec/includes/FOOTER.html SCRIPT_NAME=/includes/FOOTER.html SCRIPT_URI=http://www.askapache.com/htaccess/ SCRIPT_URL=/htaccess/ …
Category Archives: .htaccess
htaccess Redirecting non-www to www with .htaccess
If you want to redirect all non-www requests to your site to the www version, all you need to do is add the following code to your .htaccess file: in your .htaccess file RewriteEngine On RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] This will redirect any requests to http://my-domain.com to http://www.my-domain.com. There are several benefits …
Continue reading “htaccess Redirecting non-www to www with .htaccess”
friendly url with htaccess
suppose you want /articles.php?cat=$1&art=$2 to become magazine/1/2 then you need these two rules: #articles.php?cat=$1&art=$2 RewriteRule ^magazine/([^/]*)/([^/]*)$ /articles.php?cat=$1&art=$2&marker [L] RewriteCond %{REQUEST_URI} /articles\.php [NC] RewriteCond %{QUERY_STRING} ^cat=(.*)&art=(.*) RewriteCond %{QUERY_STRING} !marker RewriteRule (.*) http://mydomain/%1/%2? [R=301,L]
Top 5 Online .htaccess Mod Rewrite Rules Generator
You might be aware of mod_rewrite rule and .htaccess file if you are using wordpress as your Blogging platform, .htaccess is the apache’s default directory level configuration files which can be used to password protect and redirect requests. Webmasters need to give special attentions to .htaccess on apache webserver as its very difficult to enforce …
Continue reading “Top 5 Online .htaccess Mod Rewrite Rules Generator”
.htaccess upload_max_filesize ini_set()
I m PHP 5.2.0 / Apache and I can’t access php.ini I try to update .htaccess and added php_value upload_max_filesize “25M” php_value post_max_size “25M” However it will give me “Internal Server Error”
Add Trailing Slash to the End of the URL with .htaccess Rewrite Rules
For a website that has URLs that end with a slash (/), it’s a good practice to ensure that all url links been parsed by the web server ended with trailing slash, even if visitors forget to enter the ending slash. This avoid visitors been served with 404 Page Not Found or Page Cannot be Displayed …
Continue reading “Add Trailing Slash to the End of the URL with .htaccess Rewrite Rules”