Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Url Helper link generation prepends 'app' upon redirecting from document_root #7386

Closed
karmicdice opened this issue Sep 12, 2015 · 1 comment
Labels
Milestone

Comments

@karmicdice
Copy link
Contributor

DocumentRoot of the application is: /var/www/
Application is under /var/www/app

So I have placed the following in my .htaccess file which is under /var/www/ (outside app) ::

<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteBase /
    RewriteRule (.*) app/webroot/$1 [L]
</IfModule>

I am using UrlHelper for building URLs.

On every link it is appending /app/ for every route.

Example: /users/login when hovered on the link shows : /app/users/login

tried adding true to get full path URL - still prepends app.

@ADmad
Copy link
Member

ADmad commented Sep 12, 2015

If your app is under a subfolder of DocumentRoot ("app" in your case) then having the subfolder name in the url is expected based on default config. You can specify App.baseUrl config explicitly to '/'.

If you have more queries please post your question on stackoverflow.com or ask on IRC channel.

@ADmad ADmad closed this as completed Sep 12, 2015
@ADmad ADmad added this to the 3.0.14 milestone Sep 12, 2015
@ADmad ADmad added the support label Sep 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants