Reputation: 823
First what I have until now:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^mypage/site/(.*)$ mypage/index.php?site=$1 [L,QSA]
That is to have a more beautiful URL string like: (http://www.example.org/mypage/site/home
)
Now my problem is, that I want to have sub sites and call their with numbers like this examples.
http://www.example.org/mypage/site/home/1 //Subsite1
http://www.example.org/mypage/site/home/2 //Subsite2
http://www.example.org/mypage/site/home/3 //Subsite3
Problem is that my .htaccess
code for the sub sites does not work:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^mypage/site/home/(.*)$ home/index.php?site=home&homesubsite=$1 [L,QSA]
He is just loading the home site without the get parameter which includes the number 1,2,3 etc.. for the respective sub site.
Upvotes: 0
Views: 69
Reputation: 1841
Try This one :
RewriteEngine On
RewriteRule ^mypage/site/home/([^/]*)\.php$ /mypage/index.php?site=$1 [L]
Upvotes: 2