DV-JF Posted May 26, 2014 Share Posted May 26, 2014 Hi all, I've been using PW now for quite a long time, but now I'm stuck with a strange URL rewrite problem and I don't know if it's a problem with my server setup or a PW specific problem: URL for the site: http://www.example.com/ FTP folder: www/example.com/ URL is maped to this folder In the htaccess I've set RewriteBase / Everything works fine, except, that the folder name is repeated in every URL after the domain (even the admin URL) when I click on a link, e.g.: http://www.example.com/example.com/team/The strange thing is that when I try to open the URL "as it should" be http://www.example.com/team/is also works I've tried different this like renaming setting RewriteBase /example.com but this doesn't change the behaviour.For testing I set up a subdomain http://neu.example.com/ and here everything is fine I don't know where to search any more, perhaps some of you guys may have an idea? Greets Jens alias DV-JF Link to comment Share on other sites More sharing options...
coolcut Posted May 26, 2014 Share Posted May 26, 2014 Having the same issue. Can't find a right solution and now I don't really know how to fix this. Can somebody please help or give some possible solutions? Greets Jan Link to comment Share on other sites More sharing options...
netcarver Posted May 26, 2014 Share Posted May 26, 2014 Guys, sorry to hear about the issue. I've never used RewriteBase before so I can't simply answer this but it strikes me there must be something @DV-JF can identify that's different between his two test sites. Firstly, how is the neu subdomain .htaccess different from the main domain .htaccess? Are you using RewriteBase in the subdomain case? Secondly, what version of PW are you running? Thirdly, I assume that commenting out RewriteBase in your .htaccess file and restarting the server causes PW's admin interface to stop working? Edited to add 1: It seems to me that RewriteBase only changes how the path part of a url is handled yet you are seeing problems with the domain part. I suspect this is some combination of your site's virtual host entry + file layout problem + .htaccess rather than something major in PW but I could be wrong. Edited to add 2: Are you 100% sure you ftp'd up a .htaccess file into www/sports-vitality.de/? and that it's readable by the webserver process? Also, is there a .htaccess file in www/? I see from Stack Overflow that you can get double domain parts if you are missing a readable .htaccess where you expect it (or it doesn't have mod_rewrite info) but one exists in the parent directory. 4 Link to comment Share on other sites More sharing options...
DV-JF Posted May 27, 2014 Author Share Posted May 27, 2014 Hi netcarver, while writing my answer I tried out your last hint: Edited to add 2: [...] Also, is there a .htaccess file in www/? I see from Stack Overflow that you can get double domain parts if you are missing a readable .htaccess where you expect it (or it doesn't have mod_rewrite info) but one exists in the parent directory. The provider did some strange mapping via htaccess in the main folder: ## SITECON-CODE: SUBPATH (C167) ## RewriteEngine on RewriteCond %{HTTP_HOST} ^(www\.|)example.com$ [NC] RewriteCond %{REQUEST_URI} !(^/example.com/|^/sitecontrol|^/_md/|^/icons/) RewriteRule ^(.*)$ /example.com/$1 [L] ## SITECON-CODE: END (C167) ## That caused the error. I decided to move the Webseite to the main folder on the server and now everything works fine Many thankx !!! 1 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