hello
I have one .htaccess file in my webroot. Some urls shall be rewrited but someones shall not be rewritted. Thats because some folders are subdomains folder into my root folder (cpanels added those when u created subdomains, yea u know..).
Thats start some problems because some folders shall not be rewritten.
How can i exlude those?
here the .htaccess file:
RewriteEngine on
RewriteCond $1 !^adminpanel
RewriteCond $1 !^archive
RewriteCond $1 !^blog
RewriteCond $1 !^gallery
RewriteCond $1 !^poll
RewriteCond $1 !^fun
RewriteCond $1 !^forum
RewriteCond $1 !^member
RewriteCond $1 !^rate
RewriteCond $1 !^groups
RewriteCond $1 !^browse
RewriteCond $1 !^listing
RewriteCond $1 !^quiz
RewriteCond $1 !^events
RewriteCond $1 !^music
RewriteCond $1 !^video
RewriteCond %{REQUEST_URI} !^.*/mp3/
# # Subdomains # #
RewriteCond $1 !^blogg
RewriteCond $1 !^btitfmdemo
RewriteCond $1 !^btitfmdev
RewriteCond $1 !^btis
RewriteCond $1 !^forums
RewriteCond $1 !^license
RewriteCond $1 !^myinfo
RewriteCond $1 !^phpguide
# # Subdomains Ends # #
RewriteRule ^([^/\.]+)?/?([^/\.]+)?/?([^/\.]+)?/?([^/\.]+)?/?$ profile.php?user=$1&sub_section=$2&sub_id=$3&ht_url=true [L]
## START BLOGS ##
RewriteCond $1 ^blog
RewriteRule ^([^/\.]+)?/?([^/\.]+)?/?([^/\.]+)?/?([^/\.]+)?/?$ blog.php?sub_section=$2&id=$3&title=$4&ht_url=true [L]
## END BLOGS ##
## START RATE ##
RewriteCond $1 ^rate
RewriteRule ^([^/\.]+)?/?([^/\.]+)?/?([^/\.]+)?/?([^/\.]+)?/?$ rate.php?sub_section=$2&id=$3&title=$4&ht_url=true [L]
## END RATE ##
## START GALLERY ##
RewriteCond $1 ^gallery
RewriteRule ^([^/\.]+)?/?([^/\.]+)?/?([^/\.]+)?/?([^/\.]+)?/?$ gallery.php?sub_section=$2&id=$3&title=$4&ht_url=true [L]
## END GALLERY ##
## START POLL ##
RewriteCond $1 ^poll
RewriteRule ^([^/\.]+)?/?([^/\.]+)?/?([^/\.]+)?/?([^/\.]+)?/?$ poll.php?sub_section=$2&id=$3&title=$4&ht_url=true [L]
## END POLL ##
## START FUN ##
RewriteCond $1 ^fun
RewriteRule ^([^/\.]+)?/?([^/\.]+)?/?([^/\.]+)?/?([^/\.]+)?/?$ fun.php?sub_section=$2&id=$3&title=$4&ht_url=true [L]
## END FUN ##
## START FORUM ##
RewriteCond $1 ^forum
RewriteRule ^([^/\.]+)?/?([^/\.]+)?/?([^/\.]+)?/?([^/\.]+)?/?$ forum.php?sub_section=$2&id=$3&sub_id=$4&title=$5&ht_url=true [L]
## END FORUM ##
## START BROWSE ##
RewriteCond $1 ^browse
RewriteRule ^([^/\.]+)?/?([^/\.]+)?/?([^/\.]+)?/?([^/\.]+)?/?$ browse.php?sub_section=$2&id=$3&title=$4&ht_url=true [L]
## END BROWSE ##
## START Video ##
RewriteCond $1 ^video
RewriteRule ^([^/.]+)?/?([^/.]+)?/?([^/.]+)?/?([^/.]+)?/?$ video.php?sub_section=$2&id=$3&title=$4&ht_url=true [L]
## END Video ##
Some folders i have added to the rule works to enter, like btitfmdev, but when i shall enter forums, i only see file cannot be found. Seems like its match it with the other "forum" rule. Same with the blogg match it with the blog rule.
All this are subdomains and NEEDS to be exluded from the rules:
# # Subdomains # #
RewriteCond $1 !^blogg
RewriteCond $1 !^btitfmdemo
RewriteCond $1 !^btitfmdev
RewriteCond $1 !^btis
RewriteCond $1 !^forums
RewriteCond $1 !^license
RewriteCond $1 !^myinfo
RewriteCond $1 !^phpguide
# # Subdomains Ends # #
I dont know how to do that so some help would be verry, verry good. 😃
Please help.
Rgs - Fate