• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.5 How to remove the subfolder in URL (.htaccess)

Arty

Well-known member
#4
In .htaccess find this line
Code:
RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L]
add your custom folders and files to it.
 
#5
So what you are saying is: Replace the forums into the root folder and add my custom folders/files into that .htaccess line?

What about my own .htaccess which I have now, which takes care of the pages right now?

Code:
RewriteRule ^([A-z0-9]+)$ index.php?page=$1
Where am I supposed to place that?
 

Arty

Well-known member
#6
If only index.php conflicts with XenForo files, you can rename it, fiddle with htaccess a bit to redirect old pages to your old php file and the rest of files to XenForo. But if its more files that share names with XenForo files, then probably would be easier to leave everything as is.
 
#9
I can just leave the folder bans and Multicraft and place all those other files in 1 folder and then fix those page routes with .htaccess? Wouldn't that work?
 

Arty

Well-known member
#10
If you can adjust your vote script, then sure.

In .htaccess you need to do this: find
Code:
    RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L]
add your folders there, including vote:
Code:
    RewriteRule ^(vote/|bans/|Multicraft/|data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L]
then after this line
Code:
RewriteRule ^.*$ index.php [NC,L]
copy rules from your old .htaccess. Rename your old index.php to something else, in your rule change index.php to new file name.

Code in your old index.php might need adjustments, you must know what to change before doing any changes above. If you don't know what to change there, don't do this.