Click here to Skip to main content
15,949,686 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
# CASE SENSITIVE METHOD

Options -Indexes 
# quick custom error "document"..
ErrorDocument 404 "<html><head><title>NO!</title></head><body><h2><tt>There is nothing here.. go away quickly!</tt></h2></body></html> 


Options +FollowSymlinks
RewriteEngine on
RedirectMatch /$ http://192.168.1.25/shrineyog/index.html

# Pass Through the empty request (to be handled as DirectoryIndex)
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /?\ HTTP
RewriteRule .? - [PT]

# If index or index.php requested, strip and redirect
RewriteCond %{THE_REQUEST} index(\.php)?
RewriteRule ^index(\.php)?$ http://www.example.com/ [R=301,L]

# Remove PHP extension from links if NOT subrequest
RewriteRule ^(.+)\.php$ $1 [R=301,NS]

# Serve PHP extension from links
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.+)$ /$1.php [L]

i use this code.but its not work properly.pls correct this code or give some other code

[Edit]Code block formatting added[/Edit]
Posted
Updated 10-Jul-13 3:41am
v2

1 solution

You cannot hide anything from the address bad using .htaccess, or anything else. This is the client-side element, nothing in a Web application can get any access to the browser.

However, you can use, in particular, such thing as URL rewriting, which is totally different thing, but it can help you: http://en.wikipedia.org/wiki/URL_rewriting[^].

If this is something you may want, consider this nice tool helping you to write appropriate .htaccess:
http://www.iwebtool.com/htaccess_url_rewrite[^].

—SA
 
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