Forum Moderators: phranque
# -FrontPage-
IndexIgnore .htaccess */.?* *~ *# */HEADER* */README* */_vti*
<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName xyz.com
AuthUserFile /home/localtig/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/localtig/public_html/_vti_pvt/service.grp
Options +FollowSymLinks
RewriteEngine on
RewriteCond $1 !(^index\.php|\.(gif|jpe?g|ico|css)|^robots\.txt)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{REQUEST_URL} !=/favicon.ico
RewriteRule ^(.*)$ http://xyz.com/index.php?q=$1 [L,QSA]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*index\.php\ HTTP/
RewriteRule ^(([^/]+/)*)index\.php$ http://www.xyz.com/$1 [R=301,L]
http://subdomain.xyz.com/sample-page http://www.xyz.com/index.php?q=sample-page http://subdomain.xyz.com/sample-page # Internally rewrite incoming URL requests to the script file. # Externally redirect URL requests with index.php to remove filepath from URL.
# -FrontPage-
IndexIgnore .htaccess */.?* *~ *# */HEADER* */README* */_vti*
<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName xyz.com
AuthUserFile /home/localtig/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/localtig/public_html/_vti_pvt/service.grp
Options +FollowSymLinks
RewriteEngine on
RewriteCond $1 !(^index\.php|\.(gif|jpe?g|ico|css)|^robots\.txt)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?q=$1 [L,QSA]
#below to redirect www.xyz.com/folder1/folder2/.../foldern/index.php to www.xyz.com/folder1/folder2/../foldern/
#was written to redirect www.xyz.com/index.php to www.xyz.com/ for Google to index only the latter
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*index\.php\ HTTP/
RewriteRule ^(([^/]+/)*)index\.php$ /$1 [R=301,L]
# -FrontPage-
IndexIgnore .htaccess */.?* *~ *# */HEADER* */README* */_vti*
<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName xyz.com
AuthUserFile /home/xyz/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/xyz/public_html/_vti_pvt/service.grp
Options +FollowSymLinks
#below to redirect www.xyz.com/folder1/folder2/.../foldern/index.php to www.xyz.com/folder1/folder2/../foldern/
#was written to redirect www.xyz.com/index.php to www.xyz.com/ for Google to index only the latter
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*index\.php\ HTTP/
RewriteRule ^(([^/]+/)*)index\.php$ /$1 [R=301,L]
RewriteEngine on
RewriteCond $1 !(^index\.php|\.(gif|jpe?g|ico|css)|^robots\.txt)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?q=$1 [L,QSA]
# -FrontPage-
IndexIgnore .htaccess */.?* *~ *# */HEADER* */README* */_vti*
<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName xyz.com
AuthUserFile /home/xyz/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/xyz/public_html/_vti_pvt/service.grp
Options +FollowSymLinks
#below to redirect www.xyz.com/folder1/folder2/.../foldern/index.php to www.xyz.com/folder1/folder2/../foldern/
#was written to redirect www.xyz.com/index.php to www.xyz.com/ for Google to index only the latter
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*index\.php\ HTTP/
RewriteRule ^(([^/]+/)*)index\.php$ /$1 [R=301,L]
#redirect *.xyz.com/abc-def to *.xyz.com/index.php?q=abc-def where abc-def is not index.php or an image/css/ico file or robots.txt
RewriteEngine on
RewriteCond $1 !(^index\.php|\.(gif|jpe?g|ico|css)|^robots\.txt)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?q=$1 [L,QSA]
# Don't list FrontPage or .htaccess files in auto-generated directory index pages
IndexIgnore .htaccess */.?* *~ *# */HEADER* */README* */_vti*
#
# Access Control
Order deny,allow
#
<Limit GET POST>
Deny from all
Allow from all
</Limit>
#
<LimitExcept GET POST>
Deny from all
</LimitExcept>
#
# Authentication/authorization
AuthName xyz.com
AuthUserFile /home/xyz/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/xyz/public_html/_vti_pvt/service.grp
#
# Set required option to enable mod_rewrite
Options +FollowSymLinks
#
# Enable the rewriting engine
RewriteEngine on
#
# Externally redirect direct client requests for URL-path
# /<any subdirectories>/index.php<optional query and/or fragment> to URL
# www.example.com/<any subdirectories>/<optional query and/or fragment> so
# that Google indexes only the latter
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*index\.php([?#][^\ ]*)?\ HTTP/
RewriteRule ^(([^/]+/)*)index\.php$ http://www.example.com/$1%1 [R=301,L]
#
# Internally rewrite requests for URL-path /abc-def to internal filepath /index.php?q=abc-def
# where abc-def does not resolve to a physically-existing file or directory, and excluding
# index.php, image/css/ico files, or robots.txt to avoid unnecessary file-exists checks
RewriteCond $1 !(^index\.php|\.(gif|jpe?g|ico|css)|^robots\.txt)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?q=$1 [QSA,L]
#
# -end-
# -FrontPage-
IndexIgnore .htaccess */.?* *~ *# */HEADER* */README* */_vti*
<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName xyz.com
AuthUserFile /home/xyz/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/xyz/public_html/_vti_pvt/service.grp
Options +FollowSymLinks