there may be a similar question to mine out there, but when im looking at this reg expressions it hurts my brain to try and adapt the answer to my situation.
do to having to many pages on my server, i need to rewrite urls like:
www.mysite.com/pages/this-page-here
to
www.mysite.com/eng?sentence=this-page-here
simply deleting the pages and hoping google will figure it out the indexing has made a big mess.
so basically “pages/” be replaced with “eng?sentence=” no variables or anything this is the only case.
and i already have some rewrite code in my htaccess file which is removing the .php and i dont want to mess that up when adding this.
here is whats in ataccess right now:
# Use PHP5.3 Single php.ini as default
AddHandler application/x-httpd-php53s .php
RewriteEngine on
AddType application/x-httpd-php .htm .html
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php
Options -Indexes
ErrorDocument 404 /404.php
ErrorDocument 500 /500.php
I’d say, just add the rule and that’s it: