gr00__ Posted October 24, 2018 Share Posted October 24, 2018 I have an old site that I am migrating to PW manually. The old links contained special characters like '(' and ',' in the URL, and I would like to preserve the URLs if possible. However, PW seems to only allow certain characters in the URL, excluding the ones above. I've taken a look at .htaccess and rule 16a seems to exclude them, and I get a not found error (not even a 404 page). How do I include these characters without breaking anything? I could just edit the mentioned rule 16a, but I am not sure if that's safe for whatever reason. Provided they can be include here, I can translate them with jumplinks without too much hassle. So, the question is, is it safe and is it upgrade proof? I posted a similar question in another thread (jumplinks), but this seems like a better place to do so. Help is greatly appreciated! Link to comment Share on other sites More sharing options...
Zeka Posted October 24, 2018 Share Posted October 24, 2018 https://github.com/processwire/processwire/blob/master/wire/config.php#L777 https://github.com/processwire/processwire/blob/master/wire/config.php#L788 But I think that the best route is to update your URLs and make redirects in Jumplinks. 2 Link to comment Share on other sites More sharing options...
gr00__ Posted October 24, 2018 Author Share Posted October 24, 2018 Thanks @Zeka, I have modified the .htaccess and it seems to work. Note for future readers: parenthesis have to be escaped like '\(' to work with jumplinks. I take it this method is safe then - at worst it will lead to a 404. Does .htaccess survive upgrades though? Link to comment Share on other sites More sharing options...
Zeka Posted October 24, 2018 Share Posted October 24, 2018 3 minutes ago, gr00__ said: Does .htaccess survive upgrades though? Yes, in most cases. 1 Link to comment Share on other sites More sharing options...
gr00__ Posted October 24, 2018 Author Share Posted October 24, 2018 Nice, PW is really clever with certain things. Coming from MODX it is so much better. Thanks @Zeka! 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