|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hello,
Say I was having some problems with my site and didn't want anyone to see it while I was making changes. How would I (using .htaccess) redirect every page (except /123.php) to 123.php. eg. user goes to: http://www.musicgoeson.com/artists/fgth/ I don't want them to see this page, I want them to see 123.php How can I do this? Thanks Girish Gupta |
|
#2
|
|||
|
|||
|
Let's assume 123.php resides at -> http://www.musicgoeson.com/123.php
Place an .htaccess with the following few lines to http://www.musicgoeson.com/.htaccess ############################################# RewriteEngine on RewriteCond %{REQUEST_URI} !^/123.php$ RewriteRule (.*) http://www.musicgoeson.com/123.php [R] ############################################# The 2nd line means any REQUEST_URI EXCEPT the exact /123.php will follow the rewrite rule The 3rd line means anything including requesting an image from your site will be redirected to /123.php. So if your 123.php has no images, then you don't have to worry about it. |
![]() |
| Viewing: Dev Shed Forums > System Administration > Apache Development > .htaccess Redirect |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|