jags2ooo
asked on
.htaccess Mod Rewrite
I am running into a problem with mod-rewrite, my mod rewrite will not include pages that are index.html
example if i was to go to http://blah.com/people/ Instead of including the index.html where variable $pageincl is at it will just show the index.html as normal.
The htaccess looks like this.
Options +FollowSymlinks
# Avoid 500 error by passing charset
AddDefaultCharset utf-8
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.blah\.com [nc]
RewriteRule ^(.*)$ http://blah.com/$1 [L,r,nc]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?pageincl=$1 [QSA]
example if i was to go to http://blah.com/people/ Instead of including the index.html where variable $pageincl is at it will just show the index.html as normal.
The htaccess looks like this.
Options +FollowSymlinks
# Avoid 500 error by passing charset
AddDefaultCharset utf-8
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.blah\.com [nc]
RewriteRule ^(.*)$ http://blah.com/$1 [L,r,nc]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?pageincl=$1 [QSA]
ASKER
... Umm let me try to re-explain i go to http://blah.com/people/ instead of INcluding the Index.html file that is in people directory it will show Show me the file normally. I would like it to include the index.html file that is in people if i go to use http://blah.com/people/
Example won't include index.php file::::::::: http://bleach-network.com/information/bleach-characters/
example2: will include a non Index file http://bleach-network.com/information/bleach-shinigami
(it looks nasty cause the content is not made for that layout lol don't mind it :D just for testing)
Example won't include index.php file::::::::: http://bleach-network.com/information/bleach-characters/
example2: will include a non Index file http://bleach-network.com/information/bleach-shinigami
(it looks nasty cause the content is not made for that layout lol don't mind it :D just for testing)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
RewriteCond %{REQUEST_FILENAME} !-d
These will only fire if the requested location does not exist as a file (!-f) or a directory (!-d)
As the index.html file exists, it is shown. Delete the index.html file and it will work.
You'll get:
http://blah.com/index.php?pageincl=index.html
for:
http://www.blah.com/index.html
and you'll get:
http://blah.com/index.php?pageincl=
for:
http://www.blah.com/