.htaccess RewriteRule
-
Hey guys,
I dont find something similar on the web. I’ve created a page called /gallery/ in the backend that uses the permalink settings of wordpress.
What I’m trying to do now is to add something behind it like /gallery/Portfolio-Itemthat has to lead to /gallery/?title=Portfolio-Item without changing url.
That is my current htaccess file:
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase /theme/ RewriteRule ^gallery/([^/]+)/?$ /theme/index.php?page_id=9&title=$1 [NC,L] </IfModule> # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /theme/ RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /theme/index.php [L] </IfModule> # END WordPress
Now if I’m trying to use …/theme/gallery/Portfolio-Item I’m getting redirected to /gallery/. If I add [R] behind my RewriteRule it redirects correctly to …/theme/gallery/?title=Portfolio-Item but changes the URL, but I’m trying to use clean urls.
Any idea?
Thank you in advance.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘.htaccess RewriteRule’ is closed to new replies.