Jump to content

Recommended Posts

I have this url

 

http://www.my-site.com/index.php/site/index

 

and on my localhost i get:

 

/index.php/site/index

 

but on my host server i get:

 

/index.php

 

is there a configuration that would cut the /site/index off of the PHP_SELF and is their a more reliable way of getting that?

 

I noticed that PATH_TRANSLATED, REQUEST_URI, REDIRECT_URL, have what i am looking for should i use one of those?

The issue is not removing the site/index, i need that information in order to properly process that request.  I though that php_self should have return the /site/index like is does on my localhost setup.  I guess I use request_url for the time being and hope it is consistent.

I did not try to come off as rude, you asked for code and I did not know what code to give you besides

 

echo $_SERVER['PHP_SELF'];

 

Now to what you said, I have that url but PHP_SELF is only '/index.php' on my live host server my localhost server has /index.php/site/index.  What would cause that variable to be different, a php setting maybe?

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.