+ Reply to Thread
Results 1 to 5 of 5

Thread: sort of redirect help

  1. #1
    galaxyAbstractor's Avatar
    galaxyAbstractor is offline Community Advocate galaxyAbstractor is on a distinguished road
    Join Date
    Oct 2007
    Location
    Land of Null and Insanity
    Posts
    5,495

    sort of redirect help

    I need all links on my domain to redirect to my maintenance page at http://jagf.net/maintenance/maintenance.html (obviosly, that page shouldn't redirect to itself).

    I guess this is done in .htaccess , how?
    Edit:
    ok now I tried this:

    Code:
    RewriteEngine On
    
    # Check for maintenance file and redirect all requests
    RewriteCond %{DOCUMENT_ROOT}/maintenance/maintenance.html -f
    RewriteCond %{SCRIPT_FILENAME} !maintenance.html
    RewriteRule ^.*$ /maintenance/maintenance.html [L]
    How do I make it ignore images and .css?
    Last edited by galaxyAbstractor; 06-14-2008 at 05:02 AM. Reason: Automerged Doublepost

  2. #2
    phpasks is offline x10 Sophmore phpasks is an unknown quantity at this point
    Join Date
    Apr 2008
    Posts
    145

    Re: sort of redirect help

    Quote Originally Posted by vigge_sWe View Post
    I need all links on my domain to redirect to my maintenance page at http://jagf.net/maintenance/maintenance.html (obviosly, that page shouldn't redirect to itself).

    I guess this is done in .htaccess , how?
    Edit:
    ok now I tried this:

    Code:
    RewriteEngine On
    
    # Check for maintenance file and redirect all requests
    RewriteCond %{DOCUMENT_ROOT}/maintenance/maintenance.html -f
    RewriteCond %{SCRIPT_FILENAME} !maintenance.html
    RewriteRule ^.*$ /maintenance/maintenance.html [L]
    How do I make it ignore images and .css?
    You can used this code for css rewrite cond.

    PHP Code:

    RewriteEngine on
    RewriteCond 
    %{REQUEST_URI}  .css$
    RewriteRule ^(.+)$ css-ssc.php?css=%{REQUEST_URI
    Asif Khalyani
    http://www.phpasks.com

  3. #3
    galaxyAbstractor's Avatar
    galaxyAbstractor is offline Community Advocate galaxyAbstractor is on a distinguished road
    Join Date
    Oct 2007
    Location
    Land of Null and Insanity
    Posts
    5,495

    Re: sort of redirect help

    you mean like

    Code:
    RewriteEngine On
    
    RewriteCond %{REQUEST_URI}  .css$
    RewriteRule ^(.+)$ css-ssc.php?css=%{REQUEST_URI} 
    
    # Check for maintenance file and redirect all requests
    RewriteCond %{DOCUMENT_ROOT}/maintenance/maintenance.html -f
    RewriteCond %{SCRIPT_FILENAME} !maintenance.html
    RewriteRule ^.*$ /maintenance/maintenance.html [L]
    ?

    It doesen't work
    Edit:
    go to http://jagf.net/ for an example. Only the offsite content is loading
    Last edited by galaxyAbstractor; 06-14-2008 at 05:25 AM. Reason: Automerged Doublepost

  4. #4
    Mitch's Avatar
    Mitch is offline x10 Elder Mitch is an unknown quantity at this point
    Join Date
    Sep 2007
    Location
    Netherlands
    Posts
    906

    Re: sort of redirect help

    Cpanel has got redirect too. Use this link, (+ add your site name in front of it)
    :2082/frontend/x3/mime/redirect.html ; so:
    http://jagf.net:2082/frontend/x3/mime/redirect.html

    Then check Wild Card Redirect. If this doesn't work, first save the .htaccess file in your root. And delete it. Now try again.
    Last edited by Mitch; 06-14-2008 at 05:40 AM.
    My Website: mitch.exofire.net (currenly not really working on it ;))



  5. #5
    galaxyAbstractor's Avatar
    galaxyAbstractor is offline Community Advocate galaxyAbstractor is on a distinguished road
    Join Date
    Oct 2007
    Location
    Land of Null and Insanity
    Posts
    5,495

    Re: sort of redirect help

    Redirecting to http://jagf.net/maintenance will cause a redirection loop because 'http://.*/'

    which is located at /home/viggeswe/

    is above 'http://jagf.net/maintenance'

    which is located at /home/viggeswe/public_html/maintenance
    lol I did that before with my .htaccess. Google isn't my friend anymore. BTW, confusing error message lol
    Edit:
    got it working. close this
    Last edited by galaxyAbstractor; 06-14-2008 at 06:08 AM. Reason: Automerged Doublepost

+ Reply to Thread

Similar Threads

  1. .htaccess 301 redirect help
    By skeets in forum Programming Help
    Replies: 6
    Last Post: 05-04-2008, 08:00 PM
  2. int. explorer redirect
    By panathon in forum Scripts & 3rd Party Apps
    Replies: 2
    Last Post: 11-26-2007, 12:17 PM
  3. Redirect
    By BlueIce in forum Free Hosting
    Replies: 3
    Last Post: 10-21-2007, 08:06 AM
  4. Cpanel Redirect problem
    By BigEmmaFanz in forum Free Hosting
    Replies: 5
    Last Post: 12-10-2005, 04:51 PM
  5. How Do You Redirect?
    By TarinC in forum Off Topic
    Replies: 2
    Last Post: 10-02-2005, 11:01 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers