FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


.htaccess code help needed





rjraaz
Is anybody explain below .htaccess code line by line.

Code:
RewriteEngine On
RewriteBase /wordpress/
RewriteRule ^index\.php$ - [L]

# uploaded files
RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]

# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule  ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]
RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
RewriteRule . index.php [L]


Really i am too weak to write .htaccess files may be due to of weakness in regular expression.
ankurthakur
http://perishablepress.com/press/2006/01/10/stupid-htaccess-tricks/

Best Source ever Exclamation Everything is explained detail by detail there Wink
futurcat
rjraaz wrote:
Is anybody explain below .htaccess code line by line.

Code:
RewriteEngine On
RewriteBase /wordpress/
RewriteRule ^index\.php$ - [L]

# uploaded files
RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]

# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule  ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]
RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
RewriteRule . index.php [L]


Really i am too weak to write .htaccess files may be due to of weakness in regular expression.


Typically your Wordpress would do it by itself. It will reconstruct it when you change the setting for permalinks.

If you have other content in your site beyond WP, then yes, you are the one to mantain the .httaccess file.

If you tell us what exactly do you want to achieve, I would try to give you some tips. At some point I did play with my httaccess files for a couple of blogs I was migrating.
Related topics
Wordpess help needed.
A Bit Of Help Needed :P
Please help me!!!! HTML/Flash help needed!
mod_rewrite code
Help needed link/page checker
Help needed with Javascript and overflow
Form Mail Help Needed
if() and else(): Help needed!
question about .htaccess mod_python with publisher mod
Help needed about this contact CGI file
Big Help needed .
Help Needed - URL format
.htaccess code needed
Help needed from a volunteer WEB/player DEVELOPER/programmer
Reply to topic    Frihost Forum Index -> Scripting -> Others

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.