Na głównej stronie mam zainstalowanego Wordpress'a, a w katalogu /forum skrypt MyBB. Gdy włączę url też na forum i link do tematu wygląda np. mojastrona.pl/forum/Temat-ogloszenia przenosi na portal zamiast do odpowiedniego tematu. Pliki .htaccess tak wyglądają:
W głównym katalogu:
# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteRule ^(forum) - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress
W katalogu /forum
RewriteEngine on # Some hosts require RewriteBase to make RewriteRules work. RewriteBase /forum/ # Google SEO workaround for search.php highlights: # Make this rule the first rewrite rule in your .htaccess! RewriteRule ^([^&]*)&(.*)$ <a href="http://mypatrioci.pl/forum/$1?$2" target="_blank">http://mypatrioci.pl/forum/$1?$2</a> [L,QSA,R=301] # Google SEO 404: ErrorDocument 404 /forum/misc.php?google_seo_error=404 # Google SEO Sitemap: RewriteRule ^sitemap\-([^./]+)\.xml$ misc.php?google_seo_sitemap=$1 [L,QSA,NC] # Google SEO URL Forums: RewriteRule ^Forum\-([^./]+)$ forumdisplay.php?google_seo_forum=$1 [L,QSA,NC] # Google SEO URL Threads: RewriteRule ^Temat\-([^./]+)$ showthread.php?google_seo_thread=$1 [L,QSA,NC] # Google SEO URL Announcements: RewriteRule ^ogloszenia\-([^./]+)$ announcements.php?google_seo_announcement=$1 [L,QSA,NC] # Google SEO URL Users: RewriteRule ^uzytkownik\-([^./]+)$ member.php?action=profile&google_seo_user=$1 [L,QSA,NC] # Google SEO URL Calendars: RewriteRule ^kalendarz\-([^./]+)$ calendar.php?google_seo_calendar=$1 [L,QSA,NC] # Google SEO URL Events: RewriteRule ^wydarzenia\-([^./]+)$ calendar.php?action=event&google_seo_event=$1 [L,QSA,NC]