Changing... or "masking" existing URLs

Forum
Last Post
Threads / Messages

Vaporman87

Member
Member
Joined
Feb 14, 2014
Messages
32
Points
0
Mysidian Dollar
3,037
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!
 
Hmm... well, this might be worth a read? I have no experience in this, myself.
 
I believe you have to rename the file in your host's file manager? I'm not a coder though.
 
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?
 
Last edited:
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
 
Last edited:
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?
 
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.
 
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
 

Similar threads

Users who are viewing this thread

  • Forum Contains New Posts
  • Forum Contains No New Posts

Forum statistics

Threads
4,280
Messages
33,132
Members
1,603
Latest member
Monako
BETA

Latest Threads

Top