Install Wordpress with Laravel in same domain in folder blog

后端 未结 3 516
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-06 13:43

I have a laravel installation at same domain.com. The site is up and running. I need to install a wordpress in blog folder at domain.com/blog. when I try to install the word

3条回答
  •  感情败类
    2021-01-06 14:22

    Add below lines in .htaccess

    RewriteCond $1 !^(bmcblog)
    
     # Redirect Trailing Slashes...
     RewriteRule ^(.*)/$ /$1 [L,R=301]
    

    It will look like this

    
        
            Options -MultiViews
        
    
        RewriteEngine On
    
        RewriteCond $1 !^(bmcblog)
        # Redirect Trailing Slashes...
        RewriteRule ^(.*)/$ /$1 [L,R=301]
    
        # Redirect Trailing Slashes If Not A Folder...
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule ^(.*)/$ /$1 [L,R=301]
    
        # Handle Front Controller...
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteRule ^ index.php [L]
    
        # Handle Authorization Header
        RewriteCond %{HTTP:Authorization} .
        RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    
    

提交回复
热议问题