All users who use dede to build websites know that the shorter the document path, the better. I believe many users know how to modify it. There are also many articles for reference.
I will add some content here early this morning.
You can use $ cfg_arcdir to automatically modify the path. No tutorials have been found on the Internet. Therefore, you can find the following methods:
To reduce the trouble in the future, we recommend that you save the document in a single folder instead of under the document section.
For example, a document with a Document ID of 1
There can be two forms
1. http://www.xxxxx.com/mulu/1.html
2. http://www.xxxxx.com/html/1.html
Mulu is the topic folder of the document.
If you move this document later, the path will be changed, which has a great impact on SEO.
Therefore, we recommend that you save the document in a folder in the form of 2.
How to implement it?
Let's start the lecture now.
There are many methods, and there are also many tutorials on the Internet. I am talking about the methods I use.
Modify: common. inc. php
Find the default naming rule of the document.
Changed to the following format:
// Default naming rules for the document
$ Export _arcdir = str_replace ("/", "", $ export _arcdir); // remove the default HTML save path: "/" in the file to prevent errors
$ Art_shortname = $ pai_df_ext = '.html ';
$ Export _df_namerule = $ export _arcdir. '/{aid}'. $ export _df_ext; // call the above path for convenient management.
Note: $ cfg_arcdir can be directly set in the background.
The advantage of this method is that if you want to change the path in the future, you can directly modify the path in the background without changing the code again, which is more convenient.
Of course, you also need to modify the quick topic creation process based on the above ideas.
Reference code for quick topic creation:
<Input name = "namerule" type = "text" id = "namerule" value = "<? Php echo str_replace ("/", "", $ pai_arcdir);?> /Define aid).html "size =" 40 "/>