dcsimg
www.webdeveloper.com
Results 1 to 2 of 2

Thread: [RESOLVED] htaccess RewriteRule to redirect from a directory that doesn't exist

  1. #1
    Join Date
    Apr 2006
    Posts
    246

    resolved [RESOLVED] htaccess RewriteRule to redirect from a directory that doesn't exist

    I am attempting to redirect any URLs that attempt to access a directory that doesn't exist, however I am getting a 404 when trying the following:

    RewriteRule ^picco/(.*)$ /rangers/$1 [L,R=301]
    There is no directory called picco (it used to exist) however, when anyone tries to access a page picco/index.php for example I want to redirect to rangers/index.php.

    Is this possible?

  2. #2
    Join Date
    Apr 2006
    Posts
    246
    This worked

    +RewriteBase /
    +RewriteRule ^picco(.*)$ /rangers/$1 [R=301,L]

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles