Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Questions and Supports (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=18)
-   -   Changing... or "masking" existing URLs (http://www.mysidiaadoptables.com/forum/showthread.php?t=4414)

Vaporman87 02-26-2014 10:46 PM

Changing... or "masking" existing URLs
 
One thing I am curious about, is if there is any simple way to "rename" or "mask" some of the URLs for the script, without having to rename them in every relevant file using that particular URL path.

For instance, I might like for mysite.com/pound to appear in the browser as mysite.com/hall of honor.

Can something like this be accomplished via the .htaccess file?

Thanks for any input!

Kyttias 02-27-2014 09:58 PM

Hmm... well, this might be worth a read? I have no experience in this, myself.

squiggler 02-28-2014 02:50 AM

I believe you have to rename the file in your host's file manager? I'm not a coder though.

Vaporman87 02-28-2014 03:49 PM

Quote:

Originally Posted by Kyttias (Post 29221)
Hmm... well, this might be worth a read? I have no experience in this, myself.

I've tried various .htaccess rewrites like this, and nothing works. The only thing that shows up in the browser bar is what is listed in the database table adopts_links. Sure, I can change the URL in that table to what I like, but then that link will only ever redirect you to the index page.

If there were a way to create another column in the database called linkname, that would function to be what is displayed by the browser in the address bar, that would be great. So you would have the existing column linkurl, and the partner column linkname. One acting to gather the content, and one to display in the browser. Is this possible maybe?

IntoRain 02-28-2014 04:59 PM

The name of the php files give the name to the page. But what's the problem with modifying the file names instead? In 1.3.4 it's just two files to change I believe?

By the way, the links in the database don't actually create the page, they are just used to display the links in the correct place. As long as you have 2 files (one as controller and another as view) with the index() function they will become a page (as well as all other public functions contained in the same files) even if they aren't in the database, from what I've seen. So I don't really know if that would work out

Vaporman87 03-02-2014 05:25 PM

I figured there were several files that contained code which depended on the predetermined names for the php files as paths to certain things. Is this not the case?

Nieth 03-03-2014 06:08 PM

In my understanding, there are other files in the script that reference other files, so I would assume that if you changed the file name it would break that part of the script. I may be completely wrong but I'm not sure.

What you can do though, is mask the entire site with the same URL using your host's Domain masking and then change the names of the the links that you click on in the nav bar, so then the users would have no idea what the URL really is, so they'd just assume that its whatever the link name is.

..That may not be what you'd like to do, but seeing as I'm no avid coding professional its the only suggestion that I can provide. Hope it helps.

IntoRain 03-03-2014 07:10 PM

It doesn't break anything as long as you do this:

1) There are two files you need to change the name of. Let's take the /adopt link as an example. If you want to change /adopt to /capture you'll need to go to the main folder and change adopt.php to capture.php. Open the file edition and change AdoptController to CaptureController.
2) Then change adoptview.php to captureview.php. Edit the code and change AdoptView to CaptureView
3) Change the respective lang's file name (lang_adopt.php to lang_capture.php) if there is a need.
4) And of course change all previous links that had the old name (for example menu ones), which might be what takes more time depending on what you are changing. I guess this is what you meant and were trying to avoid, so sorry about that xD


All times are GMT -5. The time now is 12:34 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.