NameSilo

Moving a Directory script to a folder

Spaceship Spaceship
Watch

Name Trader

formerly @stubTop Member
Impact
11,467
I just bought a directory from somebody and I'm in the process of transferring it to my own server. In the process, I moved the directory from the root directory to a subdir called /dir. Everything appears to have gone smoothly, except that now the directory appears to work in both the root and the /dir subdirectory, even though there is nothing in the root directory other than an .htaccess file and an empty robots.txt file. everything else has been moved to the /dir subdir. I've 301 redirected the index.php from the root to the subdir in the .htaccess file. Here is my .htaccess file..

#################################################

## PHP Link Directory - Apache Server Settings ##

#################################################



# Protect files

<Files ~ "^(.*)\.(inc|inc\.php|tpl|sql)$">

Order deny,allow

Deny from all

</Files>



# Protect directories

<Files ~ "^(files|images|include|lang|libs(/.+)?|temp(/.+)?|templates(/.+)?|javascripts(/.+)?)$">

Order deny,allow

Deny from all

</Files>



# Disable directory browsing

Options -Indexes



# Follow symbolic links in this directory

Options +FollowSymLinks



# Set the default handler

DirectoryIndex index.php



# URL rewrite rules

<IfModule mod_rewrite.c>

RewriteEngine On



## Category redirect

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{REQUEST_FILENAME} !-l

RewriteRule ^(.*)$ index.php [QSA,L]

</IfModule>


#Added by me
RewriteEngine On
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^www\.webmasterunlimited\.com [NC]
RewriteRule (.*) http://www.webmasterunlimited.com/$1 [R=301,L]
RewriteRule \.(gif�pg�peg�ng�wf)$ /images/clearshim.gif [NC]

# BLOCK attempts to use my server as a proxy, but allow absolute URI requests to my site
RewriteCond %{THE_REQUEST} ^[A-Z]+\ /?http:// [NC]
RewriteCond %{THE_REQUEST} !^(GET|HEAD|POST|OPTIONS|PROPFIND|TRACE)\ /?http://([^.]+\.)?webmasterunlimited\.com/
RewriteRule .* - [F]

# Index.php Redirect
Redirect 301 /index.php http://www.webmasterunlimited.com/dir/index.php

So is there something wrong in my .htaccess file, or, maybe I need to correct something else. Any suggestions are welcome.
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
ok. I put it back in the root directory until I get an answer as to why this happened.
 
0
•••
0
•••
Appraise.net

We're social

Unstoppable Domains
Domain Recover
NameMaxi - Your Domain Has Buyers
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back