Mobile app version of vmapp.org
Login or Join
Cooney921

: How do I get mod_rewrite working with TYPO3 and WordPress? I've some trouble with TYPO3 (mydomain.net) and WordPress (mydomain.net/blog/) using mod_rewrite. First I was running a TYPO3 installation

@Cooney921

Posted in: #Htaccess #ModRewrite #Typo3 #Wordpress

I've some trouble with TYPO3 (mydomain.net) and WordPress (mydomain.net/blog/) using mod_rewrite.

First I was running a TYPO3 installation which uses mod_rewirte without trouble.
Now I'm trying to run a WordPress too, but if WordPress uses mod_rewrite, every click of a link bing me back to the index of my TYPO3.

The filestructure of my FTP folder:


/html/ (contains the TYPO3 files and folders and the .htaccess-file)
/html/blog/ (contains the WordPress files and folders)


This is the content of the .htaccess:

RewriteEngine On

RewriteRule ^(typo3|t3lib|tslib|fileadmin|typo3conf|typo3temp|uploads|showpic.php|favicon.ico)/ - [L]

RewriteRule ^typo3$ typo3/index_re.php [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l

RewriteRule .* index.php [L]


Any ideas as to what I should do? Or is it possible that only one CMS uses mod_rewrite?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Cooney921

1 Comments

Sorted by latest first Latest Oldest Best

 

@Bryan171

Generate a WordPress-specific .htaccess file in your /blog/ directory by logging into the WordPress admin area, clicking 'Permalinks' (under the 'Settings' header), scrolling to the bottom of the page, and clicking 'Save Changes'.

This will force WordPress to create its default .htaccess file in your /blog/ directory, which includes all mod_rewrite rules. If you see a message stating that the .htaccess file couldn't be created, copy the code in the error message and create the .htaccess file yourself. By default, the WordPress .htaccess rules should override the rules of your typo3 installation, so both CMSes should co-exist happily.

If you don't see an .htaccess file or an error message, create the default .htaccess file manually containing the following, which specifies the subdirectory you installed WordPress in as /blog/:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
</IfModule>
# END WordPress

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme