Jump to content

Masking URL without Mod_ReWrite in PHP


phpBeginner06

Recommended Posts

I would have to say yes, I do think it's possible.  Whatever path you choose has to point to a valid script and within that script you can just use $_SERVER['REQUEST_URI'] to get the full requested URI.

 

You'd end up with URLs that look like this though:

 

http://domain/some/path/script.php/param1/param2/param3

 

I've never tried it so I could be wrong though.

 

(EDIT) NM. The server will just think script.php is a directory and give you a 404.  You'd need to use something like

http://domain/some/path/script.php?param1/param2/param3

 

Link to comment
Share on other sites

roopurt18,

 

that would work; but what I am trying to do is hide the query sting and just be able to set a url of my choice to display in the address bar; no matter what page someone goes to. I read a little bit about mod_rewrite, but I am not sure if my web host allows their server to have the htaccess file changed. I know that it does not show up any where in my file manager and so far, I have not found a way to view it. Plus I want to do this for one sub-directory only and the rest of my sub-directories would follow the nomal domain path hierarchy.

 

what I would like to do is to be able to have something like this:

 

       http://www.somedomain.com

 

too replace this type of query string that is attached to root domain path

 

       http://www.somedomain.com/index.php?pgnum=27

 

I do not know if there is a way to do this just with PHP Script by itself; that is what I am wondering.

Link to comment
Share on other sites

Are some files not hidden from public view in a file manager. I think I tried to create a .htaccess file one time and tried to upload it; but my file manger said that this type of file was not allowed. I even typed the file name just like this ".htaccess"; that was the right way, isn't it? Even if I could create,upload,modify this type of file; will that not change all of my sub-directory files? I do not want all of my sub-directories pages to be masked; I only want one. I just hope I can find a way to do this with a php script and maybe use an include in all of the pages in my sub-directory, that I want the domain masked.

Link to comment
Share on other sites

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.