Forum Moderators: phranque
Options +FollowSymlinks
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_URI}!(^/index\.php$回/securename(.*)回/robots.txt$回/images/(.*))
RewriteRule .* [domain.com...]
RewriteCond %{REQUEST_URI} /securename(.*)
RewriteRule securename index\.php [T=application/x-httpd-php,L]
then:
www.domain.com/securename?page=1 --> www.domain.com/index.php?page=1
the above is work fine, the securename?page=1 works internally as index.php?page=1 but:
1- $_GET method not work
I solved I use $_SERVER['REQUEST_URI'] instead
2- but if some one type www.domain.com/index.php?page=1 works too
I want to hide .php pages completely exclude of securename?
please Help me to solve this because if .php appeares again in my site that's mean PHP is still available, but I want to hide php completely ..
BEST REGARDS
1. Redirect (301) the PHP URL request to the URL that you want the user to see, or,
2. Rewrite a direct request for any PHP to an internal filepath such as /this.does.net.exist (and you will not have a file there) and let the 404 handler handle it, be serving a 404 error.
[webmasterworld.com...]
[webmasterworld.com...]
Example:
[Original URI]
http://www.example.com/subdirectory/abc123
[.htaccess code]
RewriteRule /subdirectory/([a-z0-9]+) /customers/orders/profile.php?ID=$1 [NC,L]
[Rewritten destination URI]
http://www.example.com/customers/orders/profile.php?ID=abc123
[edited by: jdMorgan at 7:10 pm (utc) on Sep. 26, 2007]
[edit reason] example.com [/edit]
Options +FollowSymlinks
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_URI}!(^/index\.php$回/securename(.*)回/robots.txt$回/images/(.*))
RewriteRule .* [domain.com...]
RewriteCond %{REQUEST_URI} /securename(.*)
RewriteRule securename index\.php [T=application/x-httpd-php,L]
#this section added for www.domain.com/index.php to www.domain.com/securename
RewriteCond %{THE_REQUEST} \.php
RewriteRule index\.php securename [L]
#or this
RewriteCond %{THE_REQUEST} \.php
RewriteRule \.php none
ErrorDocument 404 [domain.com...]
very Thanks for all specially for