Frank Vèssia Posted March 9, 2014 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)
Joss Posted March 13, 2014 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
Frank Vèssia Posted March 13, 2014 Author Posted March 13, 2014 thanks @joss but can't use that code on stackoverflow, and the case is opposite of mine...
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