Click here to Skip to main content
15,867,453 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,
I am using .htacces file in which i put the redirection
as
if anyone put www.mysite.com/index.php
will redirect to www.mysite.com.
now i have a directory name support.
so the url is www.mysite.com/support/index.php.
what i want is simply not redirect
www.mysite.com/support/index.php to www.mysite.com/support.

If anyone of you know the solution then please let me know.

Thanks
Posted

Typical approach is to use RewriteCond in combination with rules. In example below,
RewriteRule is ignored, if on this path exists file (-f) or directory (-d)

C#
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?/$1 [L]


More details and examples are present in the documentation

http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html[^]
 
Share this answer
 
v2
Comments
[no name] 24-Jan-13 5:01am    
hi Vyacheslav Voronenko,
Can you give with example, because I never ever use .htaccess file earlier.
Thanks
Vyacheslav Voronenko 24-Jan-13 5:56am    
Smth like

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?/$1 [L]
hi,
Just put a blank .htaccess file on that folder.
Thanks
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900