Frank Vèssia Posted March 9, 2014 Share Posted March 9, 2014 Hi guys, I need to create fake subdomains for my users, right now my htaccess code is this one: RewriteCond %{HTTP_HOST} !^(www\.|cdn\.)?domain\.com$ [NC] RewriteCond %{HTTP_HOST} ^(\w+)\.domain\.com$ [NC] RewriteRule ^ user/%1%{REQUEST_URI} and it works pretty good except for one thing:this works => http://username.domain.com/subfolder this doesn't => http://username.domain.com/subfolder/the trailing slash causes some issue...any idea? (I had to remove the trailing slash option from the template of "subfolder" page otherwise i get errors in both cases) Link to comment Share on other sites More sharing options...
Frank Vèssia Posted March 13, 2014 Author Share Posted March 13, 2014 Any advice? Link to comment Share on other sites More sharing options...
Joss Posted March 13, 2014 Share Posted March 13, 2014 Saw this on stackoverflow, not sure it helps: http://stackoverflow.com/questions/5080495/mode-rewrite-with-without-trailing-slash-on-end-of-url Link to comment Share on other sites More sharing options...
Frank Vèssia Posted March 13, 2014 Author Share Posted March 13, 2014 thanks @joss but can't use that code on stackoverflow, and the case is opposite of mine... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now