I have a domain called www.abc123.com.
after public_html/, I have a folder called portfolio which runs everything for www.abc123.com
Using this htaccess after public_html/
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^$ portfolio/index.php [L]
RewriteRule ^(.+)$ $1.html [L,QSA]
RewriteRule ^(.*)\.(\d+)(_m_\d+)?\.([^\.]+)$ $1.$4 [L,QSA]
</IfModule>
So when www.abc123.com is visited it will run portfolio/index.php with a clean url of www.abc123.com .
Now Ive added a subdomain called coolstuff now my file manager looks like this
public_html/
cgi-bin/
portfolio/
coolstuff/index.html
now everytime I go to coolstuff.abc123.com/index.html i get 500 Internal Server Error. If I take out my htaccess then coolstuff.abc123.com/index.html will show and www.abc123.com will show anchor tags of my cgi-bin,portfolio,coolstuff.
I need:
Keep your rules like this:
RewriteEngine On
RewriteCond %{HTTP_HOST} abc123
RewriteRule ^$ portfolio/index.php [L]
RewriteCond %{HTTP_HOST} abc123
RewriteCond %{DOCUMENT_ROOT}/$1\.html -f [NC]
RewriteRule ^(.+?)/?$ $1.html [L,QSA]
RewriteCond %{HTTP_HOST} abc123
RewriteRule ^(.*)\.(\d+)(_m_\d+)?\.([^.]+)$ $1.$4 [L]
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.