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

Make sure no_script_name is false in app/config/settings.yml! #1

Open
ajb opened this issue Dec 21, 2011 · 5 comments
Open

Make sure no_script_name is false in app/config/settings.yml! #1

ajb opened this issue Dec 21, 2011 · 5 comments

Comments

@ajb
Copy link

ajb commented Dec 21, 2011

Can this go in the readme? Took me a while to figure out that this is why this plugin wasn't working in the index.php/ environment.

@themouette
Copy link
Owner

Hi,
what's the issue you experiment ?
It is supposed to work even with no_script_name to true (in dev environment for instance)

@ajb
Copy link
Author

ajb commented Dec 21, 2011

Hi,

Thanks for the reply.

I was getting an issue where http://www.MYAPPNAME.com/js/apps/routes.js wasn't returning the file.

I changed my .htaccess so that it would point to http://www.MYAPPNAME.com/index.php/js/apps/routes.js.

Here's my .htaccess if you're interested:

Options -MultiViews +FollowSymLinks +ExecCGI

RewriteEngine On

uncomment the following line, if you are having trouble

getting no_script_name to work

RewriteBase /

RewriteRule ^js/app/routes.js index.php/js/app/routes.js

we skip all files with .something

RewriteCond %{REQUEST_URI} ..+$
RewriteCond %{REQUEST_URI} !.html$
RewriteRule .* - [L]

we check if the .html version is here (caching)

RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f

no, so we redirect to our front web controller

RewriteRule ^(.*)$ index.php [QSA,L]

Thanks!
Adam

On Dec 21, 2011, at 5:20 AM, Julien MUETTON wrote:

Hi,
what's the issue you experiment ?
It is supposed to work even with no_script_name to true (in dev environment for instance)


Reply to this email directly or view it on GitHub:
#1 (comment)

@themouette
Copy link
Owner

Hi,

script is auto appened when
``app_ch_cms_expose_routing_register_scripts` is set to true, and route
is generated with scriptname if needed

is it what you are looking for ?

Julien.

On Wed, Dec 21, 2011 at 5:28 PM, Adam Becker <
[email protected]

wrote:

Hi,

Thanks for the reply.

I was getting an issue where http://www.MYAPPNAME.com/js/apps/routes.jswasn't returning the file.

I changed my .htaccess so that it would point to
http://www.MYAPPNAME.com/index.php/js/apps/routes.js.

Here's my .htaccess if you're interested:

Options -MultiViews +FollowSymLinks +ExecCGI

RewriteEngine On

uncomment the following line, if you are having trouble

getting no_script_name to work

RewriteBase /

RewriteRule ^js/app/routes.js index.php/js/app/routes.js

we skip all files with .something

RewriteCond %{REQUEST_URI} ..+$
RewriteCond %{REQUEST_URI} !.html$
RewriteRule .* - [L]

we check if the .html version is here (caching)

RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f

no, so we redirect to our front web controller

RewriteRule ^(.*)$ index.php [QSA,L]

Thanks!
Adam

On Dec 21, 2011, at 5:20 AM, Julien MUETTON wrote:

Hi,
what's the issue you experiment ?
It is supposed to work even with no_script_name to true (in dev
environment for instance)


Reply to this email directly or view it on GitHub:

#1 (comment)


Reply to this email directly or view it on GitHub:

#1 (comment)

@ajb
Copy link
Author

ajb commented Dec 21, 2011

I'm using "forced route exposition", like this:

app:
ch_cms_expose_routing:
routes_to_expose:
- my_first_route_to_expose
- another_route

just to be clear, without my modified .htaccess, the plugin worked perfectly on all environments except the production environment, which has no_script_name set to true.

Adam

On Dec 21, 2011, at 8:35 AM, Julien MUETTON wrote:

Hi,

script is auto appened when
``app_ch_cms_expose_routing_register_scripts` is set to true, and route
is generated with scriptname if needed

is it what you are looking for ?

Julien.

On Wed, Dec 21, 2011 at 5:28 PM, Adam Becker <
[email protected]

wrote:

Hi,

Thanks for the reply.

I was getting an issue where http://www.MYAPPNAME.com/js/apps/routes.jswasn't returning the file.

I changed my .htaccess so that it would point to
http://www.MYAPPNAME.com/index.php/js/apps/routes.js.

Here's my .htaccess if you're interested:

Options -MultiViews +FollowSymLinks +ExecCGI

RewriteEngine On

uncomment the following line, if you are having trouble

getting no_script_name to work

RewriteBase /

RewriteRule ^js/app/routes.js index.php/js/app/routes.js

we skip all files with .something

RewriteCond %{REQUEST_URI} ..+$
RewriteCond %{REQUEST_URI} !.html$
RewriteRule .* - [L]

we check if the .html version is here (caching)

RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f

no, so we redirect to our front web controller

RewriteRule ^(.*)$ index.php [QSA,L]

Thanks!
Adam

On Dec 21, 2011, at 5:20 AM, Julien MUETTON wrote:

Hi,
what's the issue you experiment ?
It is supposed to work even with no_script_name to true (in dev
environment for instance)


Reply to this email directly or view it on GitHub:

#1 (comment)


Reply to this email directly or view it on GitHub:

#1 (comment)


Reply to this email directly or view it on GitHub:
#1 (comment)

@themouette
Copy link
Owner

your issue has nothing to do with the way you expose routes, but the way
you include script.

script is dynamic, so you can use the dedicated helper
(use_dynamic_javascript i guess) or use auto inclusion in your
app.yml (register_scripts option).

Hope this helped.

If the probklem is still there, let me know and give the way you include
script.

Julien.

On Wed, Dec 21, 2011 at 5:38 PM, Adam Becker <
[email protected]

wrote:

I'm using "forced route exposition", like this:

app:
ch_cms_expose_routing:
routes_to_expose:
- my_first_route_to_expose
- another_route

just to be clear, without my modified .htaccess, the plugin worked
perfectly on all environments except the production environment, which has
no_script_name set to true.

Adam

On Dec 21, 2011, at 8:35 AM, Julien MUETTON wrote:

Hi,

script is auto appened when
``app_ch_cms_expose_routing_register_scripts` is set to true, and
route
is generated with scriptname if needed

is it what you are looking for ?

Julien.

On Wed, Dec 21, 2011 at 5:28 PM, Adam Becker <
[email protected]

wrote:

Hi,

Thanks for the reply.

I was getting an issue where
http://www.MYAPPNAME.com/js/apps/routes.jswasn't returning the file.

I changed my .htaccess so that it would point to
http://www.MYAPPNAME.com/index.php/js/apps/routes.js.

Here's my .htaccess if you're interested:

Options -MultiViews +FollowSymLinks +ExecCGI

RewriteEngine On

uncomment the following line, if you are having trouble

getting no_script_name to work

RewriteBase /

RewriteRule ^js/app/routes.js index.php/js/app/routes.js

we skip all files with .something

RewriteCond %{REQUEST_URI} ..+$
RewriteCond %{REQUEST_URI} !.html$
RewriteRule .* - [L]

we check if the .html version is here (caching)

RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f

no, so we redirect to our front web controller

RewriteRule ^(.*)$ index.php [QSA,L]

Thanks!
Adam

On Dec 21, 2011, at 5:20 AM, Julien MUETTON wrote:

Hi,
what's the issue you experiment ?
It is supposed to work even with no_script_name to true (in dev
environment for instance)


Reply to this email directly or view it on GitHub:

#1 (comment)


Reply to this email directly or view it on GitHub:

#1 (comment)


Reply to this email directly or view it on GitHub:

#1 (comment)


Reply to this email directly or view it on GitHub:

#1 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants