0

I'm contacting you for help.

I develop a site in laravel with sub-domain and dynamic domain. I don't have any problems as long as I'm in the Laravel logic. On the other hand, my client added the request to keep url and part of the site with another php site.

To summarize: https://test.com/livres/auteurs/ = new website https://test.com/pca/{variable} = old site to keep.

I tried to put it in the public folder and with a htaccess to prevent laravel from going on it.

It fails. and I get in the server logs this error:[Wed Jan 09 13:04:00 2019][error][client 62.197.103.26] File does not exist: /home/www/mondossier/mondossier/public/ca/D233FA6A

<IfModule mod_rewrite.c>

<IfModule mod_negotiation.c>

    Options -MultiViews

</IfModule>



RewriteEngine On

RewriteBase /

RewriteRule ^(ca) - [L]

#RewriteRule ^/ca\/([a-z0-9-]+)\$ /ca/ [R] /index.php?code=lireArticle [L]



# 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

RewriteCond "%{REQUEST_URI}" "!^/ca/" [NC,OR]

RewriteCond %{QUERY_STRING} ^ca/ [NC]

RewriteRule ^/ca/([A-Z0-9]+)$ https://test.com/ca/index.php?code=$1 [L]



RewriteRule ^ index.php [L]



# Handle Authorization Header

RewriteCond %{HTTP:Authorization} .

RewriteRule . - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]



RewriteCond %{HTTPS} !=on

RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]



RewriteCond %{THE_REQUEST} ^GET.index.php [NC]



RewriteRule (.?)index.php/(.*) /$1$2 [R=301,NE,L]

Do you see my mistake? Any other leads?

Thank you in advance

2
  • Difficult to say, but usually a .htaccess file in a subfolder will override those above. So I'd have thought dropping in the old site should just work. Commented Jan 9, 2019 at 13:11
  • First of all, thank you for your answer, unfortunately, I have already tried and I got the same result . Commented Jan 9, 2019 at 13:19

1 Answer 1

1

My solution was to put the other site in the "Resources" folder then "Views" and change the.php to.blade.php and put the url in my "Web.php". I manage this in my controller.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.