绑定在二级目录url.
# .htaccess main domain to subdirectory redirect
# Copy and paste the following code into the .htaccess file
# in the public_html folder of your hosting account
# make the changes to the file according to the instructions.
# Do not change this line.
RewriteEngine on
# Change example.com to be your main domain.
RewriteCond %{HTTP_HOST} ^cyq.me$
# Change ‘subdirectory’ to be the directory you will use for your main domain.
RewriteCond %{REQUEST_URI} !^/url/
# Don’t change these line.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Change ‘subdirectory’ to be the directory you will use for your main domain.
RewriteRule ^(.*)$ /url/$1
# Change example.com to be your main domain again.
# Change ‘subdirectory’ to be the directory you will use for your main domain
# followed by / then the main file for your site, index.php, index.html, etc.
RewriteCond %{HTTP_HOST} ^cyq.me$
RewriteRule ^(/)?$ url/index.php [L]
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteOptions MaxRedirects=1
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^([a-zA-Z0-9_-]+)$ redirect.php?alias=$1 [L]
</IfModule>
短网址绑定二级目录的htaccess文件:等您坐沙发呢!