- Joined
- Jul 12, 2011
- Messages
- 1,229
- Reaction score
- 475
deleted content
Last edited:
Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!
Join Today!No problem, if you need any help let me know!
website.com/site/home
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php
Hello! This is a simple tutorial that will show you how to have cleaner URLs for your maplestory CMS! Most sites have a url structure so that every page is like this:
Code:?page=pagename
An easy way to make cleaner looking URLs is to use the Rewrite Module for Apache. To have cleaner URLs, you must have that module activated. In wamp, you can do this by clicking the icon, clicking Apache, then Apache Modules, and then selecting "rewrite_module."
After doing this, open up notepad, and then save the file. When saving the file, change the file name to ".htaccess"
Change the "Save as type" to "All Files"
Once you have done this, open up your .htaccess file with your favorite text editor, and copy and paste this text:
Code:RewriteEngine On RewriteRule ^register index.php?page=register RewriteRule ^downloads index.php?page=downloads RewriteRule ^rankings index.php?page=rankings RewriteRule ^donate index.php?page=donate
This will change all your URLs from index.php?page=pagename to domain.com/pagename
If you have more/other pages, you can follow the pattern.
If you have any questions, comments, or a better way to do this, comment below!
GET said:The GET method means retrieve whatever information (in the form of an entity) is identified by the Request-URI. If the Request-URI refers to a data-producing process, it is the produced data which shall be returned as the entity in the response and not the source text of the process, unless that text happens to be the output of the process.
POST said:The POST method is used to request that the origin server accept the entity enclosed in the request as a new subordinate of the resource identified by the Request-URI in the Request-Line. POST is designed to allow a uniform method to cover the following functions:
- Annotation of existing resources;
- Posting a message to a bulletin board, newsgroup, mailing list,or similar group of articles;
- Providing a block of data, such as the result of submitting aform, to a data-handling process;
- Extending a database through an append operation.
Methods can also have the property of "idempotence" in that (aside from error or expiration issues) the side-effects of N > 0 identical requests is the same as for a single request. The methods GET, HEAD, PUT and DELETE share this property. Also, the methods OPTIONS and TRACE SHOULD NOT have side effects, and so are inherently idempotent.
But that would mean goodbye to security through obscurity...Appends any query string from the original request URL to any query string created in the rewrite target
Either way would work, I suppose. But pretty much all CMS's that have been released here use the $_GET model.
RewriteRule ^(.*)$ index.php?page=$1
Code:RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^(.*)$ $1.php
If you don't have any URL structure on your CMS (most older CMS' and some of the newer CMS'), use the above on your htaccess file to hide the php extension to have the same effect as greenelfx's thingymabob.