Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

225
Visualizações
is there any way to hide and redirect url by using rewrite rule?

[Edited] Hi There were lot of example to do similier what what i am trying to achive but it seems I am not understanding them properly, so asking for help. Please dont close this as duplicate ,

I have wordpess installed as primary website like this https://www.example.com/

apache configuration is like this

    #ServerName www.example.com
    ServerName example.com
    ServerAdmin example.com
    ServerAlias www.example.com
    DocumentRoot /var/www/html/example/web
    Header set Access-Control-Allow-Origin "*"
    SSLEngine on

    SSLCertificateFile /etc/ssl/certificate/example.com/mydomain.crt
    SSLCertificateKeyFile /etc/ssl/certificate/example.com/mydomain.key
    SSLCertificateChainFile /etc/ssl/certificate/example.com/mydomain.ca-bundle
    <Directory /var/www/html/example/web>
            AllowOverride All
            Order allow,deny
            allow from all
            #AuthType Basic
            #AuthName "Restricted Content"
            #AuthUserFile /etc/apache2/.htpasswd
            # Require valid-user </Directory>

Now i need to place 3 laravel project inside the web directory

> mydomain
>  - web (wordpress)
>    - en  ( Laravel project)
>    - bn  (laravel project)
>    - demo (laravel project)

now when i type like this it opens.as its php laravel project.

https://example.com/demo/public/
https://example.com/demo/public/home
https://example.com/demo/public/login

https://example.com/en/public/ 
https://example.com/bn/public/

However, I want to rewrite the rules such a way that when some one type

https://example.com/demo/ -> it will provide data from   https://example.com/demo/public/    but url will be https://example.come/demo
https://example.com/bn/ -> it will provide data from  https://example.com/bn/public/ but url will be https://example.com/bn

https://example.com/en/ -> it will provide data from  https://example.com/en/public/ but url will be https://example.com/en

so all the pages after /public/* will be /demo/* or /bn/* or /en/*

I have edited .httaccess under /web/demo/ with bellow ref : https://laracasts.com/discuss/channels/laravel/wordpress-and-laravel-on-subfolder?page=1

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} !^public
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>

but when i type https://example.com/demo/

its gives 404 which comming from laravel.

any help will be appreciate.

over 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda