重写我的基本URL-Vbulletin

重写我的基本URL-Vbulletin,url,base-url,Url,Base Url,我目前有一个vbulletin论坛,我把它的主题复制到另一个网站上进行应用 将此文件放在文件的顶部: <base href="http://example.com/forums/"/><!--[if IE]></base><![endif]--> 所以我只是复制/粘贴了源代码,然后修改了主体 这里的问题是我有一个“submit.php”按钮,它的作用是基于基本url的,所以它变成了http://example.com/forums/submi

我目前有一个vbulletin论坛,我把它的主题复制到另一个网站上进行应用

将此文件放在文件的顶部:

<base href="http://example.com/forums/"/><!--[if IE]></base><![endif]-->

所以我只是复制/粘贴了源代码,然后修改了主体

这里的问题是我有一个“submit.php”按钮,它的作用是基于基本url的,所以它变成了
http://example.com/forums/submit.php
但我希望它可以这样做:
http://application.example.com/submit.php


如果我从源代码中更改BASEURL,主题将不再工作,并且我正在尝试保留主题

如果您使用带mod_rewrite的apache,您可以在根目录中创建.htaccess文件

RewriteEngine on

# Don't apply to URLs that go to existing files or folders.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# Only apply to URLs that aren't already under folder forums.
RewriteCond %{REQUEST_URI} !^/forums/

# Rewrite all those to insert /forums.
RewriteRule ^(.*)$ /forums/$1
文件